Skip to content

Add OpenTelemetry support for .NET SDK #181

Description

@reachanihere

Add distributed tracing and metrics instrumentation to the .NET SDK using OpenTelemetry.

Features:

  • Opt-in via AppContext.SetSwitch("GitHub.Copilot.EnableOpenTelemetry", true) or environment variable
  • Spans: copilot.session, copilot.turn, copilot.tool_execution, copilot.subagent, copilot.hook, copilot.inference
  • Metrics: token usage, cost, tool executions, errors, duration
  • Follows GenAI Semantic Conventions

Benefits:

  • End-to-end visibility into Copilot SDK operations
  • Integration with any OpenTelemetry-compatible backend (Jaeger, Zipkin, Azure Monitor, Datadog, etc.)
  • Consistent with OpenAI SDK's opt-in telemetry pattern

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions