OpenTelemetry (OTel) is an open source observability framework. It provides a standard way to collect telemetry events and metrics and export them to compatible observability tools. For more information, see What is OpenTelemetry? on the OTel website.
When you enable OTel monitoring, you can send data from users' Copilot clients to an OTel-compatible backend. This lets you analyze agent sessions and understand agent usage across your enterprise.
What data does Copilot send?
Copilot sends three types of data:
- Traces show the flow of an agent session and connect each step, including model calls and tool use. For example, a trace can show an agent calling a model, using the
readFiletool, and calling the model again to produce a response. - Metrics are numeric measurements that help you identify patterns over time. For example, token usage metrics track the number of input and output tokens used in model calls.
- Events record individual actions at a specific point in time. For example, an edit feedback event records whether a user accepted or rejected an agent edit.
By default, the data does not include prompts, responses, or tool arguments. You can choose to capture this content, but it may contain sensitive information, such as code, file contents, and user prompts.
Enabling OpenTelemetry
To collect OTel data from users' Copilot clients:
- Set up an observability backend. Choose a secure backend that supports the OpenTelemetry Protocol (OTLP). Some backends can receive OTLP data directly. For other backends, deploy an OpenTelemetry Collector to receive, process, and forward the data. For examples, see Use with observability backends in the VS Code documentation.
- Configure users' clients. Set configuration values to enable OTel in each client and configure it to send data to your OTLP endpoint by configuring the endpoint, headers, and authentication token.
- Interpret data. Use the collected data to analyze sessions and identify trends. For an example implementation, see Monitor AI coding agents with Grafana in the Microsoft documentation.
Configuring users' clients
Enterprises can enforce OTel configuration across supported clients with managed settings. These settings are enforced across users' clients and cannot be overridden. The telemetry property includes keys for enabling and configuring OpenTelemetry.
For more information, see 엔터프라이즈 관리 설정 구성 and 엔터프라이즈 관리 설정.
Client documentation
For more details of how OpenTelemetry is used across clients, see:
- Monitor agent usage with OpenTelemetry in the VS Code documentation
- 코필로트 SDK용 OpenTelemetry 계측
- GitHub Copilot CLI 명령 참조