From 092960b8023c141a997dc6f3b427129854359f67 Mon Sep 17 00:00:00 2001 From: Zhichao Li Date: Thu, 2 Jul 2026 23:22:05 -0700 Subject: [PATCH] Add enterprise-managed OTel section to monitoring guide Cross-references the OpenTelemetry managed-settings policy documented in enterprise/ai-settings.md (delivery channels, secure headers, reload-to-apply) and clarifies that managed telemetry policy overrides env vars and user settings. --- docs/agents/guides/monitoring-agents.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/agents/guides/monitoring-agents.md b/docs/agents/guides/monitoring-agents.md index aa553fe0da..6a057e3fd0 100644 --- a/docs/agents/guides/monitoring-agents.md +++ b/docs/agents/guides/monitoring-agents.md @@ -11,6 +11,8 @@ Keywords: - traces - metrics - agents +- enterprise +- managed settings --- # Monitor agent usage with OpenTelemetry @@ -245,7 +247,7 @@ Open **Settings** (`kb(workbench.action.openSettings)`) and search for `copilot ### Environment variables -Environment variables always take precedence over VS Code settings. +Environment variables always take precedence over VS Code settings. When your organization mandates OTel configuration through [Copilot managed settings](#manage-otel-configuration-for-your-organization), those managed values take precedence over both environment variables and user settings. | Variable | Default | Description | |---|---|---| @@ -271,6 +273,15 @@ When `setting(github.copilot.chat.otel.dbSpanExporter.enabled)` is `true`, Copil |---|---| | **Chat: Export Agent Traces DB** (`github.copilot.chat.otel.exportAgentTracesDB`) | Export the local SQLite span database to a `.db` file. Only available when the `dbSpanExporter.enabled` setting is `true`. | +## Manage OTel configuration for your organization + +Enterprises can mandate OTel export configuration centrally through Copilot managed settings, so that telemetry flows to an approved collector without each developer setting `OTEL_*` environment variables. Managed telemetry configuration applies to both the Copilot Chat extension and the agent host process. + +Administrators deliver these settings through the `telemetry` block in Copilot managed settings, using native MDM, a server-managed GitHub account policy, or a `managed-settings.json` file on disk. For the full list of managed telemetry keys, the delivery channels, and important caveats such as secure header handling and reload-to-apply behavior, see [Configure telemetry export with OpenTelemetry](/docs/enterprise/ai-settings.md#configure-telemetry-export-with-opentelemetry). + +> [!NOTE] +> When a managed telemetry value is configured, it takes precedence over both environment variables and user settings. The resolved value follows the order: policy, then environment variable, then user setting, then default. + ## Trace structure for background and Claude agents When OTel is enabled, all agent types are automatically instrumented. The same settings that enable foreground agent traces also enable Copilot CLI and Claude agent traces. @@ -441,6 +452,7 @@ OTel monitoring is off by default and emits no data until you explicitly enable ## Related content * [AI settings reference](/docs/agents/reference/ai-settings.md) +* [Manage AI settings in enterprise environments](/docs/enterprise/ai-settings.md) * [Troubleshoot AI in VS Code](/docs/agents/agent-troubleshooting/troubleshooting.md) * [OTel GenAI Semantic Conventions](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/gen-ai/) * [Inside the LLM Call: GenAI Observability with OpenTelemetry](https://opentelemetry.io/blog/2026/genai-observability/)