Connect GitHub Copilot to Observagent.
Use Copilot's OpenTelemetry export, either per developer or organization-managed, to send Copilot Chat, CLI, and desktop app telemetry to Observagent.
Use Copilot's built-in OpenTelemetry export
GitHub Copilot supports OpenTelemetry export for the Copilot Chat extension in VS Code, the agent host process that powers Copilot CLI, and the desktop Copilot app. There are two ways to enable it: an individual developer setting environment variables in their own terminal, or an organization admin distributing a managed telemetry configuration.
- An individual setup applies only to VS Code instances launched from the terminal session where the variables are set.
- An organization-managed setup applies via
managed-settings.json, native MDM (Windows Registry or macOS managed preferences), or settings resolved from the signed-in GitHub account. - Both paths configure the OTLP export endpoint, transport (
otlp-httporotlp-grpc), and exporter headers such as an authentication token. - Field names and available signals can vary by Copilot version; confirm the current schema in GitHub's Copilot OpenTelemetry documentation before a wide rollout.
Minimum required plan
GitHub Copilot Free (individual client setup).
- Use a Copilot-enabled account and a supported client. Available models and usage allowances depend on the plan.
- Organization-wide managed settings require the corresponding enterprise administration permissions. Check that your organization permits telemetry configuration.
Requirements reviewed on .
Integration steps
Select a platform to see commands and paths for your computer. Project setup and delivery verification are shared across platforms.
- Step 1
Create a project and project key
In Observagent, enable Logs and Metrics on a project, turn monitoring on, and generate a project key with telemetry:write permission.
- Use a separate key for Copilot so Observagent can attribute this source reliably.
- Step 2
Set up individual OTLP export
Set these variables in the terminal you will launch VS Code from, then start VS Code from that same session so it inherits them.
- Environment variables apply to this PowerShell window; closing it clears them unless you persist them.
- VS Code only inherits variables that were set before it was launched.
PowerShell$env:OTEL_EXPORTER_OTLP_ENDPOINT = "https://dashboard.observagent.cloud" $env:OTEL_EXPORTER_OTLP_HEADERS = "Authorization=Bearer YOUR_PROJECT_KEY" $env:OTEL_EXPORTER_OTLP_PROTOCOL = "http/protobuf" code . - Step 3
Or apply an organization-managed configuration
On Windows, an admin distributes this through an MDM policy in the Windows Registry, or the file-based managed-settings.json path GitHub documents for your Copilot version.
- Field names in the managed configuration can vary by Copilot release; confirm the current schema before a wide rollout.
- Managed settings apply to the Copilot Chat extension, the agent host behind Copilot CLI, and the desktop Copilot app.
- Step 4
Relaunch and verify delivery
Fully close VS Code or the desktop Copilot app, reopen it from the configured session, complete a Copilot Chat or CLI request, then check Logs and Metrics for the project in Observagent.
- Complete a real Copilot Chat or CLI action; opening the app alone may not generate a request event.
- Allow up to a minute for the export interval before checking Observagent.
Diagnose export failures
- Nothing arrives after individual setup: the variables were set in one terminal, but VS Code was already running or was launched from a different session that never saw them.
- Managed setting has no effect: another delivery channel (MDM, account-level policy, or a different
managed-settings.jsonpath) is taking precedence; check settings resolution order for your platform. - 401/403 from Observagent: the bearer header is missing, malformed, revoked, or lacks
telemetry:write. - Connection refused or protocol mismatch: confirm the transport (
otlp-httpvsotlp-grpc) matches what your collector endpoint expects. - Only some surfaces report: Copilot Chat, Copilot CLI, and the desktop app were added to managed OpenTelemetry export at different times; confirm your installed versions all support it.
Review what gets exported
Treat Copilot's OpenTelemetry export as operational telemetry (requests, timing, tool activity, and errors), not a guaranteed prompt-free feed. Confirm what your installed Copilot version includes in its logs and metrics before enabling this for repositories with sensitive content, and prefer the managed path with least-privilege headers for an organization-wide rollout. Observagent applies its own server-side content controls as an additional boundary.