Skip to content

Fix bug in OTEL_EXPORTER_OTLP_*_PROTOCOL handling for all signals#4627

Merged
Kielek merged 19 commits into
open-telemetry:mainfrom
xiang17:fix-otlp-priority-env
Nov 24, 2025
Merged

Fix bug in OTEL_EXPORTER_OTLP_*_PROTOCOL handling for all signals#4627
Kielek merged 19 commits into
open-telemetry:mainfrom
xiang17:fix-otlp-priority-env

Conversation

@xiang17
Copy link
Copy Markdown
Contributor

@xiang17 xiang17 commented Nov 20, 2025

Why

Fixes #4593
Based on existing PR at #4601

GetExporterOtlpProtocol ignores the more specific (priority) environment variable and does not pass the value to SDK.

What

Respect the per-signal variables (OTEL_EXPORTER_OTLP_<signal>__PROTOCOL) env vars.

Log a warning and return the default HttpProtobuf option if the env vars are invalid/absent.

Tests

  • Added tests to verify that all priority envs are picked up to manually pass to SDK.

Checklist

  • CHANGELOG.md is updated.
  • Documentation is updated.
  • New features are covered by tests.

@xiang17 xiang17 marked this pull request as ready for review November 20, 2025 03:38
@xiang17 xiang17 requested a review from a team as a code owner November 20, 2025 03:38
Comment thread src/OpenTelemetry.AutoInstrumentation/Configurations/Otlp/OtlpSettings.cs Outdated
Comment thread src/OpenTelemetry.AutoInstrumentation/Configurations/Otlp/OtlpSettings.cs Outdated
@Kielek Kielek added this to the 1.13.0 - .NET10 support milestone Nov 21, 2025
@xiang17 xiang17 changed the title Support OTEL_EXPORTER_OTLP_*_PROTOCOL for all signals Fix bug in OTEL_EXPORTER_OTLP_*_PROTOCOL handling for all signals Nov 21, 2025
Comment thread CHANGELOG.md Outdated
Comment thread src/OpenTelemetry.AutoInstrumentation/Configurations/Otlp/OtlpSettings.cs Outdated
Comment thread src/OpenTelemetry.AutoInstrumentation/Configurations/Otlp/OtlpSettings.cs Outdated
@Kielek Kielek enabled auto-merge (squash) November 24, 2025 05:30
@Kielek Kielek merged commit 890e3f7 into open-telemetry:main Nov 24, 2025
52 checks passed
@xiang17 xiang17 deleted the fix-otlp-priority-env branch November 25, 2025 02:03
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.

Cannot set to http/protobuf with OTEL_EXPORTER_OTLP_METRICS_PROTOCOL

6 participants