Repository navigation
otlptrace: treat unix-abstract env endpoints as insecure - #9261
Open
vignesh2027 wants to merge 1 commit into
Open
vignesh2027 wants to merge 1 commit into
vignesh2027 wants to merge 1 commit into
Conversation
vignesh2027
requested review from
MrAlias,
XSAM,
dashpole,
dmathieu,
flc1125,
pellared and
ps-mir
as code owners
October 22, 2026 07:47
withEndpointScheme in the shared trace config template only treated "http" and "unix" as insecure. A unix-abstract:// endpoint set through OTEL_EXPORTER_OTLP_ENDPOINT or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT fell through to WithSecure, so the trace exporter turned TLS on for a local abstract socket. The metric template already handles unix-abstract since open-telemetry#8862. Add unix-abstract to the insecure schemes in the template, regenerate the otlptracegrpc and otlptracehttp copies, and add a test case.
vignesh2027
force-pushed
the
fix/otlptrace-unix-abstract-env-insecure
branch
from
October 22, 2026 07:47
f1151d9 to
617d6b7
Compare
Pull request dashboard statusWaiting on maintainers · refreshed 2026-10-22 14:28 UTC Merge when ready. Status above doesn't look right?
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrow fix consistently updates the template and generated files, includes targeted regression coverage, and has no unresolved findings.
No open issues 🎉
What changed in this PR
This PR makes trace exporters treat environment-configured unix-abstract:// endpoints as insecure, aligning them with Unix endpoints and the metric exporter behavior established in #8862.
Changes:
- Adds
unix-abstractto the shared trace configuration’s insecure schemes. - Updates both generated exporters and adds regression coverage for insecure configuration and gRPC target preservation.
- Documents the behavior change in the changelog.
No issues were identified. Reported test results were not independently rerun.
| File | Description |
|---|---|
internal/shared/otlp/otlptrace/otlpconfig/options_test.go.tmpl |
Adds the shared Unix abstract endpoint regression case. |
internal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpl |
Classifies Unix abstract endpoints as insecure. |
exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/options_test.go |
Includes the generated regression case. |
exporters/otlp/otlptrace/otlptracehttp/internal/otlpconfig/envconfig.go |
Applies the generated scheme-handling fix. |
exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/options_test.go |
Includes the generated regression case. |
exporters/otlp/otlptrace/otlptracegrpc/internal/otlpconfig/envconfig.go |
Applies the generated scheme-handling fix. |
CHANGELOG.md |
Records the fix for both trace exporters. |
Review effort: Balanced
dmathieu
approved these changes
Oct 22, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9261 +/- ##
=======================================
- Coverage 89.4% 89.4% -0.1%
=======================================
Files 346 346
Lines 22848 22848
=======================================
- Hits 20443 20438 -5
- Misses 2405 2410 +5
🚀 New features to boost your workflow:
|
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.
withEndpointSchemeininternal/shared/otlp/otlptrace/otlpconfig/envconfig.go.tmpltreats onlyhttpandunixendpoints as insecure. Aunix-abstract://endpoint set throughOTEL_EXPORTER_OTLP_ENDPOINTorOTEL_EXPORTER_OTLP_TRACES_ENDPOINTfalls through toWithSecure, so the trace exporter enables TLS for a local abstract socket. The metric template already listsunix-abstract(#8862), so the trace and metric exporters behave differently for the same endpoint.This adds
unix-abstractto the insecure schemes in the trace template and regenerates theotlptracegrpcandotlptracehttpcopies withgo generate. The only generated changes are the one-lineenvconfig.gochange and the new test case in both modules.Testing:
Added a "Test Environment Unix Abstract Endpoint" case to the shared trace options test template, mirroring the existing unix case and the metric unix-abstract case. It fails on main in both modules (
Insecureis false) and passes with the change.go test -race ./...,golangci-lint run,go vetandgofmtare clean forexporters/otlp/otlptrace/otlptracegrpcandexporters/otlp/otlptrace/otlptracehttp.