Skip to content

feat(otlp): add custom headers support for OTLP exporter#1

Merged
CalvinAllen merged 1 commit into
mainfrom
feat/otlp/custom-headers
Dec 23, 2025
Merged

feat(otlp): add custom headers support for OTLP exporter#1
CalvinAllen merged 1 commit into
mainfrom
feat/otlp/custom-headers

Conversation

@CalvinAllen

Copy link
Copy Markdown
Contributor

Summary

  • Added OtlpHeaders dictionary property to TelemetryConfiguration for custom OTLP headers
  • Created shared ConfigureOtlpExporter() method to reduce code duplication
  • Headers are applied to all OTLP exporters (traces, metrics, logs)
  • Updated README with documentation and Honeycomb example

Usage

var config = new TelemetryConfiguration
{
    ServiceName = "MyExtension",
    OtlpEndpoint = "https://api.honeycomb.io:443",
    UseOtlpHttp = true
};

config.OtlpHeaders["x-honeycomb-team"] = "your-api-key";
config.OtlpHeaders["x-honeycomb-dataset"] = "your-dataset";

VsixTelemetry.Initialize(config);

Test Plan

  • Build succeeds
  • Headers are correctly formatted as key1=value1,key2=value2 for OTLP exporter

@CalvinAllen CalvinAllen force-pushed the feat/otlp/custom-headers branch from d700416 to c9499cb Compare December 23, 2025 16:01
@CalvinAllen CalvinAllen merged commit 35390c5 into main Dec 23, 2025
3 checks passed
@CalvinAllen CalvinAllen deleted the feat/otlp/custom-headers branch December 23, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant