Skip to content

Add OTLP protocol telemetry options#1648

Draft
loganrosen wants to merge 1 commit into
github:mainfrom
loganrosen:loganrosen/add-otlp-protocol-options
Draft

Add OTLP protocol telemetry options#1648
loganrosen wants to merge 1 commit into
github:mainfrom
loganrosen:loganrosen/add-otlp-protocol-options

Conversation

@loganrosen

Copy link
Copy Markdown
Contributor

Summary

  • Add OTLP HTTP protocol telemetry config options across Node.js, Python, Go, .NET, Java, and Rust SDKs.
  • Map the new options to OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_TRACES_PROTOCOL, and OTEL_EXPORTER_OTLP_METRICS_PROTOCOL when the SDK spawns the Copilot CLI.
  • Document JSON/protobuf protocol selection and add focused mapping tests, including partial-config cases that ensure unset protocol env vars stay unset.

Testing

  • just install
  • just format
  • cd java && mvn spotless:apply
  • cd java && mvn verify
  • cd nodejs && npm test -- --run test/telemetry.test.ts test/e2e/client_options.e2e.test.ts -t "TelemetryConfig env var mapping|should propagate process options"
  • cd nodejs && npm test -- --run test/e2e/client_options.e2e.test.ts -t "should only set configured otlp protocol env vars|should propagate process options"
  • cd python && uv run pytest ../python/test_telemetry.py -q
  • cd python && uv run pytest ../python/e2e/test_client_options_e2e.py::TestClientOptions::test_should_propagate_process_options_to_spawned_cli -q
  • cd python && uv run pytest ../python/e2e/test_client_options_e2e.py::TestClientOptions::test_should_only_set_configured_otlp_protocol_env_vars ../python/e2e/test_client_options_e2e.py::TestClientOptions::test_should_propagate_process_options_to_spawned_cli -q
  • cd go && go test . && go test ./internal/e2e -run 'TestTelemetryConfigUnit|TestClientOptionsE2E'
  • cd go && go test ./internal/e2e -run 'TestClientOptionsE2E/should_(only_set_configured_OTLP_protocol_env_vars|propagate_process_options_to_spawned_cli)'
  • cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj --filter "FullyQualifiedName~GitHub.Copilot.Test.Unit.TelemetryTests|FullyQualifiedName~Should_Propagate_Process_Options_To_Spawned_Cli"
  • cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj --filter "FullyQualifiedName~Should_Only_Set_Configured_Otlp_Protocol_Env_Vars|FullyQualifiedName~Should_Propagate_Process_Options_To_Spawned_Cli"
  • cd rust && cargo test --features test-support --lib
  • cd rust && cargo test --features test-support --lib telemetry_config && cargo test --features test-support --lib build_command

Note: full auth-dependent local E2E runs hit harness/auth isolation without GITHUB_ACTIONS=true, so validation focused on the affected telemetry mapping paths.

Expose OTLP HTTP protocol selection through each SDK telemetry config and map the values to the standard OpenTelemetry protocol environment variables when spawning the Copilot CLI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant