open-telemetry / opentelemetry-go

OpenTelemetry Go API and SDK
https://opentelemetry.io/docs/languages/go
Apache License 2.0
5.35k stars 1.09k forks source link

Override insecure when endpoint URL is set #5944

Closed sevaorlov closed 3 weeks ago

sevaorlov commented 3 weeks ago

When an endpoint is set in both Environment variable with "http" and passed in WithEndpointURL with "https", Insecure is set to true while the endpoint is used from WithEndpointURL.

Example

The real endpoint used is "http://someendpoint/somepath", which is actually neither of both.

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.6%. Comparing base (937813d) to head (6dbacfe). Report is 1 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/open-telemetry/opentelemetry-go/pull/5944/graphs/tree.svg?width=650&height=150&src=pr&token=8efTmh4kvf&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go/pull/5944?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ Coverage Diff @@ ## main #5944 +/- ## ===================================== Coverage 84.6% 84.6% ===================================== Files 272 272 Lines 22864 22857 -7 ===================================== + Hits 19347 19350 +3 + Misses 3173 3163 -10 Partials 344 344 ``` [see 7 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-go/pull/5944/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)