Skip to main content
All GitHub Copilot integration capabilities

About

Ship GitHub Copilot agent telemetry to Sazabi using Copilot’s built-in OpenTelemetry exporter. Copilot CLI and VS Code Copilot Chat emit a trace for every agent interaction — the agent invocation, each model call with token usage, and each tool call — and VS Code also emits session, tool-call, turn, and edit-feedback events. Nothing changes in your projects. Spans are named invoke_agent, chat <model>, and execute_tool <tool> and carry attributes like gen_ai.request.model, gen_ai.usage.input_tokens, gen_ai.usage.output_tokens, gen_ai.tool.name, gen_ai.conversation.id, and github.copilot.nano_aiu. Prompts, responses, and tool arguments and output are not exported unless you turn content capture on.
Content capture attaches prompts, responses, tool arguments and output, and the source code and file paths they contain to every span. Leave it off unless you understand the privacy implications for your team.

Prerequisites

  • Copilot CLI or VS Code with the GitHub Copilot Chat extension
  • To configure every developer at once: enterprise owner access and a .github-private repository selected as the enterprise’s source of client governance (GitHub’s guide)
  • Your Sazabi intake URL, shown above — open the log source and copy the Intake URL from its setup screen (the public key is embedded in the URL)

Set up in the dashboard

Pick one path. Enterprise managed settings configure Copilot CLI, VS Code, the GitHub Copilot app, and JetBrains IDEs for every developer whose Copilot license comes from your enterprise, and override local settings. Without enterprise admin access, configure Copilot CLI or VS Code on your own machine.

Every client (enterprise managed settings)

1

Add the telemetry block to the managed settings

In your enterprise’s .github-private repository, add this telemetry block to copilot/managed-settings.json and commit it to the default branch:
copilot/managed-settings.json
Replace <your intake URL> with the intake URL shown above. Pass the bare URL — Copilot appends the signal paths itself.capture.identity adds each developer’s GitHub login (user.name), operating-system account, and machine name. Set it to false to keep telemetry pseudonymous. The highest-precedence managed source supplies the whole telemetry object and blocks are never merged, so put every key in the one block that wins, including in team overrides. See GitHub’s telemetry reference.
2

Restart Copilot clients

Clients read managed settings when they start. Developers restart Copilot CLI, and reload VS Code when it prompts, before telemetry begins.

Copilot CLI on this machine

1

Export the OpenTelemetry variables

Add the following to the shell profile (or launcher script) that starts copilot:
~/.zshrc
Replace <your intake URL> with the intake URL shown above. Leave OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT unset so prompts and tool content stay off. See the Copilot CLI OpenTelemetry reference.
2

Start a new Copilot CLI session

Environment variables load at startup. Open a new shell and start copilot; telemetry begins with that session.

VS Code Copilot Chat on this machine

1

Turn on OpenTelemetry in VS Code settings

Run Preferences: Open User Settings (JSON) from the Command Palette and add:
settings.json
Replace <your intake URL> with the intake URL shown above. Keep github.copilot.chat.otel.captureContent off. OTEL_EXPORTER_OTLP_ENDPOINT and COPILOT_OTEL_* environment variables take precedence over these settings. See VS Code’s agent monitoring guide.
2

Reload the window

Run Developer: Reload Window so Copilot Chat starts exporting.

Set up with the CLI

You can also register the GitHub Copilot log source with the Sazabi CLI (installed and authenticated — see CLI reference). Registering the source mints the same intake URL the dashboard shows above (the public key is embedded in its hostname):
The command prints the intake URL for the new source — copy the whole URL and point Copilot at it using the configuration shown above. Run sazabi log-sources get <log-source-id> at any time to reprint the endpoint, or sazabi log-sources list to see every log source in the project.

Verify

Restart Copilot CLI or reload VS Code and send one prompt to the agent. Open the Intake page in the Sazabi dashboard and confirm records from the GitHub Copilot source appear within a minute or two. From the CLI, sazabi logs ask "How many GitHub Copilot log lines arrived in the last 15 minutes?" confirms rows are arriving, and sazabi logs ask "Output tokens per gen_ai.request.model for GitHub Copilot in the last hour" breaks down token counts by model. Copilot CLI reports under service github-copilot and VS Code under copilot-chat, unless the managed settings set a serviceName.

Troubleshooting

Nothing arrives — For Copilot CLI, confirm the exports are present in the shell that started copilot (env | grep -E 'COPILOT_OTEL|OTEL_'). For VS Code, reload the window. Check that the endpoint is the bare intake URL with no /v1/... suffix. Managed settings have no effect — Confirm the .github-private repository is selected as your enterprise’s source of client governance, the file is copilot/managed-settings.json on the default branch, and the developer’s Copilot license comes from that enterprise. Telemetry goes to another collector — A higher-precedence managed telemetry block (from device management or a local managed-settings file) wins, or, for VS Code, COPILOT_OTEL_* or OTEL_EXPORTER_OTLP_ENDPOINT environment variables override your settings. Remove or update them. Prompt text is showing up — Content capture is on (capture.prompts and related keys, OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT, or github.copilot.chat.otel.captureContent). Turn it off and restart. Copilot metrics are stored as log records — Copilot sends OpenTelemetry metrics on the same endpoint and has no switch to turn them off on their own. Each data point is stored as a log record with telemetry.type set to metric, not as a time series. Copilot cloud agent and code review do not appear — They run on GitHub and do not export OpenTelemetry. JetBrains IDEs accept the managed telemetry setting, but GitHub does not document which signals they export.

Further reading

Intake

See per-source ingestion volume and health.

Log sources

Browse the full log source catalog.