Skip to content

Managed telemetry.headers prevents OpenTelemetry (OTEL) export #4669

Description

@jlisee

Describe the bug

When OpenTelemetry is configured through /etc/github-copilot/managed-settings.json, adding any entry to telemetry.headers causes Copilot CLI to stop exporting telemetry.

The same configuration exports successfully when headers is absent or empty. The same header also works when supplied through OTEL_EXPORTER_OTLP_HEADERS.

GitHub's managed-settings documentation lists telemetry.headers as a supported Copilot CLI setting.

Affected version

GitHub Copilot CLI 1.0.82

Steps to reproduce the behavior

  1. Start a local OTLP/HTTP listener on 127.0.0.1:4318 (see example here)

  2. Configure /etc/github-copilot/managed-settings.json:

{
  "telemetry": {
    "enabled": true,
    "endpoint": "http://127.0.0.1:4318",
    "protocol": "http/json",
    "headers": {}
  }
}
  1. Restart Copilot CLI and generate activity.

    OTLP requests are received by the listener.

  2. Change only headers:

"headers": {
  "X-Test": "HELLO"
}
  1. Restart Copilot CLI and generate activity again.

    No OTLP requests are received.

  2. Remove headers from the managed settings and instead start Copilot with:

OTEL_EXPORTER_OTLP_HEADERS='X-Test=HELLO' copilot

Expected behavior

A non-empty telemetry.headers object in managed settings should not disable OTLP export.

For example:

"headers": {
  "X-Test": "HELLO"
}

should result in normal OTLP export with X-Test: HELLO attached to the HTTP requests, consistent with the documented behavior.

Additional context

  • Ubuntu Linux 22.04
  • File-based managed settings at /etc/github-copilot/managed-settings.json
  • File is a regular file owned by root:root, mode 0644
  • Managed settings are successfully detected and applied

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:configurationConfig files, instruction files, settings, and environment variablesarea:enterpriseGitHub Enterprise (GHE/GHES) support, org policies, and enterprise settingsarea:networkingProxy, SSL/TLS, certificates, corporate environments, and connectivity issues

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions