Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/admin/config/site-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,20 @@ All advanced configuration options and their default values are shown below.
// Maximum number of batch spec templates to display in the template library UI. Default is 20.
"batchChanges.templateLibrary.displayLimit": 20,

// Enables/disables the AI agent that configures auto-indexing for a repository on behalf of administrators. Disabled by default. The agent is available only if auto-indexing is enabled and the license includes AI Terms 2025.
"codeIntelAutoIndexing.agent.enabled": false,

// The maximum number of auto-indexing configuration agent runs that may execute concurrently. Default is 2.
"codeIntelAutoIndexing.agent.maxConcurrentRuns": 2,

// The maximum number of index jobs a single auto-indexing configuration agent run may execute before giving up. Default is 4.
"codeIntelAutoIndexing.agent.maxIndexAttempts": 4,

// The model the auto-indexing configuration agent runs with, as a model reference such as "anthropic::2024-10-22::claude-sonnet-5-5". Only the agent's default model and the alternatives declared for it in internal/inference/models are accepted; saving any other value is rejected, and a stored value that is no longer supported after an upgrade falls back to the default model. Leave unset to use the default model.
// Other example values:
// - "anthropic::2024-10-22::claude-sonnet-5-5"
"codeIntelAutoIndexing.agent.model": null,

// Whether auto-indexing policies may apply to all repositories on the Sourcegraph instance. Default is false. The policyRepositoryMatchLimit setting still applies to such auto-indexing policies.
"codeIntelAutoIndexing.allowGlobalPolicies": false,

Expand Down
78 changes: 77 additions & 1 deletion docs/self-hosted/observability/alerts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4512,7 +4512,7 @@ Generated query for warning alert: `max((max by (instance) (go_goroutines{job=~"
]
```

<sub>*Managed by the Sourcegraph Code Plane team.*</sub>
<sub>*Managed by the Sourcegraph Platform team.*</sub>

<details>
<summary>Technical details</summary>
Expand Down Expand Up @@ -6700,6 +6700,82 @@ Custom query for warning alert: `max(((sum(increase(src_workerutil_dbworker_stor

<br />

## codeintel-autoindexing: codeintel_indexing_agent_error_rate

<p class="subtitle">agent run handler error rate over 1h</p>

**Descriptions**

- <span class="badge badge-warning">warning</span> codeintel-autoindexing: 20%+ agent run handler error rate over 1h for 30m0s
- <span class="badge badge-critical">critical</span> codeintel-autoindexing: 50%+ agent run handler error rate over 1h for 30m0s

**Next steps**

- Check worker logs for "indexing agent failed" to find the failing run IDs and underlying errors. The run`s steps are also visible in the repository`s code graph dashboard.
- An error is a handler failure (LLM provider error or timeout, gitserver or database error, quota check failure), not an agent verdict: runs that end in needs_intervention or gave_up count as successes here.
- Check for upstream LLM provider issues or timeouts.
- A spike that correlates with resets in the "Stalled job resetters" group points at worker crashes rather than per-run failures.
- More help interpreting this metric is available in the [dashboards reference](/self-hosted/observability/dashboards#codeintel-autoindexing-codeintel_indexing_agent_error_rate).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:

```json
"observability.silenceAlerts": [
"warning_codeintel-autoindexing_codeintel_indexing_agent_error_rate",
"critical_codeintel-autoindexing_codeintel_indexing_agent_error_rate"
]
```

<sub>*Managed by the Sourcegraph Code Understanding team.*</sub>

<details>
<summary>Technical details</summary>

Custom query for warning alert: `max(((sum(increase(src_codeintel_indexing_agent_errors_total{op="Handle"\}[3h])) / (sum(increase(src_codeintel_indexing_agent_total\{op="Handle"\}[3h])) + sum(increase(src_codeintel_indexing_agent_errors_total\{op="Handle"\}[3h]))) * 100) and ((sum(increase(src_codeintel_indexing_agent_total\{op="Handle"\}[3h])) + sum(increase(src_codeintel_indexing_agent_errors_total\{op="Handle"}[3h]))) &gt;= 5)) &gt; 20)`

Custom query for critical alert: `max(((sum(increase(src_codeintel_indexing_agent_errors_total{op="Handle"\}[3h])) / (sum(increase(src_codeintel_indexing_agent_total\{op="Handle"\}[3h])) + sum(increase(src_codeintel_indexing_agent_errors_total\{op="Handle"\}[3h]))) * 100) and ((sum(increase(src_codeintel_indexing_agent_total\{op="Handle"\}[3h])) + sum(increase(src_codeintel_indexing_agent_errors_total\{op="Handle"}[3h]))) &gt;= 5)) &gt; 50)`

</details>

<br />

## codeintel-autoindexing: codeintel_indexing_agent_subagent_context_limit_rate

<p class="subtitle">subagent runs that hit the context limit by agent</p>

**Descriptions**

- <span class="badge badge-warning">warning</span> codeintel-autoindexing: more than 10% of a subagent's runs hit the context limit over 1h
- <span class="badge badge-critical">critical</span> codeintel-autoindexing: more than 25% of a subagent's runs hit the context limit over 1h

**Next steps**

- Subagents have no compaction. When the task plus accumulated tool results outgrow the input token budget of the subagent model, the subagent stops early. Usually it returns a summary of partial findings with a note that they may be incomplete (max_input_tokens_summarized); if even that summary does not fit or fails, the parent gets "sub-agent exceeded maximum input tokens; retry with a narrower task" instead (max_input_tokens). Either way the parent answers with incomplete findings or spends extra turns retrying.
- Check the "Agent tool calls" group for the same agent: a tool whose output grew recently, or a jump in its call rate, is the usual cause.
- A rise that starts at a deploy points at a changed subagent prompt, tool, or model input token budget.
- If the results of one tool dominate, tighten its result limits or the subagent instructions so it reads less per turn.
- More help interpreting this metric is available in the [dashboards reference](/self-hosted/observability/dashboards#codeintel-autoindexing-codeintel_indexing_agent_subagent_context_limit_rate).
- **Silence this alert:** If you are aware of this alert and want to silence notifications for it, add the following to your site configuration and set a reminder to re-evaluate the alert:

```json
"observability.silenceAlerts": [
"warning_codeintel-autoindexing_codeintel_indexing_agent_subagent_context_limit_rate",
"critical_codeintel-autoindexing_codeintel_indexing_agent_subagent_context_limit_rate"
]
```

<sub>*Managed by the Sourcegraph Code Understanding team.*</sub>

<details>
<summary>Technical details</summary>

Custom query for warning alert: `max(((sum by (workload, agent) (increase(src_agent_runs_total{agent!="main",stop_reason=~"max_input_tokens\\|max_input_tokens_summarized",workload=~"code_intel_indexing_agent"\}[1h])) / sum by (workload, agent) (increase(src_agent_runs_total\{agent!="main",workload=~"code_intel_indexing_agent"\}[1h])) * 100) and (sum by (workload, agent) (increase(src_agent_runs_total\{agent!="main",workload=~"code_intel_indexing_agent"}[1h])) &gt;= 10)) &gt; 10)`

Custom query for critical alert: `max(((sum by (workload, agent) (increase(src_agent_runs_total{agent!="main",stop_reason=~"max_input_tokens\\|max_input_tokens_summarized",workload=~"code_intel_indexing_agent"\}[1h])) / sum by (workload, agent) (increase(src_agent_runs_total\{agent!="main",workload=~"code_intel_indexing_agent"\}[1h])) * 100) and (sum by (workload, agent) (increase(src_agent_runs_total\{agent!="main",workload=~"code_intel_indexing_agent"}[1h])) &gt;= 10)) &gt; 25)`

</details>

<br />

## codeintel-uploads: codeintel_uploads_janitor_scip_documents_oldest_dereference_log_age

<p class="subtitle">approximate age of the oldest SCIP document dereference log record, based on the lowest-ID record</p>
Expand Down
Loading
Loading