OTLP exporter uses scheme from endpoint configuration#1771
OTLP exporter uses scheme from endpoint configuration#1771codeboten merged 11 commits intoopen-telemetry:mainfrom
Conversation
owais
left a comment
There was a problem hiding this comment.
LGTM. Wondering if using urlparse would be better?
Yes, please, |
ocelotl
left a comment
There was a problem hiding this comment.
Approving since this fixes the issue, but please consider using urlparse, @codeboten ✌️
|
|
||
| parsed_url = urlparse(endpoint) | ||
|
|
||
| if endpoint is None: |
There was a problem hiding this comment.
did you intend to write is not here? Because there is a default value and I don't see how it can be None? Could you also add a test to insecure_channel?
There was a problem hiding this comment.
thank you for catching this, i meant to check for insecure, there's already a few tests for the insecure_channel but i can add one specifically with the endpoint parameter.
There was a problem hiding this comment.
test added if you can take a look @lonewolf3739
Description
As per the specification, the otlp exporter must use the scheme from the endpoint to determine if a connection should be secure or not. https://github.com/open-telemetry/opentelemetry-specification/blob/f62744a679814937214fd17394ab3fa8a9099424/specification/protocol/exporter.md#configuration-options
Fixes #1747
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: