fix: add error handling for insecure HTTP endpoints with TLS client configuration#7914
Merged
dmathieu merged 5 commits intoopen-telemetry:mainfrom Mar 2, 2026
Merged
fix: add error handling for insecure HTTP endpoints with TLS client configuration#7914dmathieu merged 5 commits intoopen-telemetry:mainfrom
dmathieu merged 5 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7914 +/- ##
=====================================
Coverage 81.7% 81.7%
=====================================
Files 304 304
Lines 23333 23339 +6
=====================================
+ Hits 19078 19086 +8
+ Misses 3866 3864 -2
Partials 389 389
🚀 New features to boost your workflow:
|
dmathieu
reviewed
Feb 16, 2026
dmathieu
reviewed
Feb 17, 2026
Member
dmathieu
left a comment
There was a problem hiding this comment.
This will need changelog entries.
…in OTLP HTTP exporters
Member
Author
@dmathieu Done, added ;) |
dmathieu
approved these changes
Feb 17, 2026
…onfiguration Co-authored-by: Damien Mathieu <42@dmathieu.com>
pellared
approved these changes
Feb 26, 2026
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR moves the
insecure + TLS configvalidation into the core OTLP HTTP exporters inopentelemetry-go(trace, metric, and log), instead of relying on validation in external/config-wrapper code.This aligns with feedback from
open-telemetry/opentelemetry-go-contribPR open-telemetry/opentelemetry-go-contrib#8560: these packages are maintained/released together, so the check should be enforced in this repo as well.What changed
"insecure HTTP endpoint cannot use TLS client configuration"otlpmetrichttpclient constructionotlploghttpclient constructionotlptracehttpclient startup (Start, sinceNewClientdoes not return an error)WithInsecure()andWithTLSClientConfig(...)are both setWithHTTPClient(...)is provided (preserves existing precedence semantics)Behavior
insecure+ TLS config) now fails fast directly in exporters.WithHTTPClientoverride behavior remains unchanged.Testing
Ran:
go test ./...inexporters/otlp/otlpmetric/otlpmetrichttpgo test ./...inexporters/otlp/otlplog/otlploghttpgo test ./...inexporters/otlp/otlptrace/otlptracehttpRelated
open-telemetry/opentelemetry-go-contribPR (otelconf: fail closed when OTLP HTTP exporter uses http endpoint with TLS/mTLS config opentelemetry-go-contrib#8560)