otlpmetricgrpc: preserve gRPC env endpoint targets - #8862
Open
RedZapdos123 wants to merge 5 commits into
Open
Conversation
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
RedZapdos123
requested review from
MrAlias,
XSAM,
dashpole,
dmathieu,
flc1125 and
pellared
as code owners
August 25, 2026 05:18
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8862 +/- ##
=====================================
Coverage 88.4% 88.4%
=====================================
Files 331 331
Lines 21001 21009 +8
=====================================
+ Hits 18572 18582 +10
+ Misses 2429 2427 -2
🚀 New features to boost your workflow:
|
MrAlias
approved these changes
Aug 25, 2026
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
Contributor
Author
|
Resolved the merge conflict. |
Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com>
…env-endpoint-path Signed-off-by: Mridankan Mandal <xerontitan90@gmail.com> # Conflicts: # CHANGELOG.md
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.
Description:
Issue #8861 reported that
OTEL_EXPORTER_OTLP_METRICS_ENDPOINTURLs with a path could leak that path into the OTLP/gRPC dial target because the env config built the target withpath.Join(u.Host, u.Path).This PR updates OTLP metric env endpoint handling to use only
host:portfor HTTP(S) URLs while preserving fullunix://andunix-abstract://gRPC targets.It also adds regression tests that cover URL endpoints with paths and unix-family endpoints in the metric exporter env config paths.
Closes #8861.
Verifications:
cd exporters/otlp/otlpmetric/otlpmetricgrpc && go test ./... -count=1cd exporters/otlp/otlpmetric/otlpmetrichttp && go test ./... -count=1make golangci-lint/./exporters/otlp/otlpmetric/otlpmetricgrpcmake golangci-lint/./exporters/otlp/otlpmetric/otlpmetrichttp