Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for OTEL_EXPORTER_OTLP_ENDPOINT according to the spec #1885

Closed
mhofstetter opened this issue May 7, 2021 · 0 comments · Fixed by #1886
Closed

Add support for OTEL_EXPORTER_OTLP_ENDPOINT according to the spec #1885

mhofstetter opened this issue May 7, 2021 · 0 comments · Fixed by #1886
Labels
enhancement New feature or request
Milestone

Comments

@mhofstetter
Copy link
Contributor

Problem Statement

The auto-configuration of the OTLP exporter endpoint via environment variable OTEL_EXPORTER_OTLP_ENDPOINT doesn't work as expected.

According to the OpenTelemetry Spec the endpoint should be configured with a mandatory scheme which needs to be http or https (e.g. https://localhost:4317).

Neither the HTTP nor the GRPC driver supports this.

OtlpHttp

Post "http://http://localhost:4317/v1/traces": dial tcp: lookup http on 10.96.0.10:53: no such host

OtlpGrpc

traces exporter is disconnected from the server http://localhost:4317: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp: address http://localhost:4317: too many colons in address"

This is especially painful if other SDK's behave the other way around and don't support an endpoint environment variable without the scheme.

Proposed Solution

It would be great if the OpenTelemetry Go SDK would not only support the SDK Spec Environment Variables by its name, but also its interpretation.

Therefore, the AutoConfiguration via Environment variable should at least support the endpoint configuration with the scheme. In addition it would be great if the option WithInsecure() would be automatically configured if the endpoints has the scheme http.

I'm aware that there was and is quite some discussion about the scheme in the endpoint - especially in combination with the different OTLP drivers. I do understand that this "interpretation" might not be the best way - but it would be great if all SDK's would behave the same way.

It should be possible to keep the changes small and the API and behaviour stable by introducing this additional logic only in the "environment variable configuration" part and keeping the internal config model the same. For backwards compatibility it would also be possible to support the old way without scheme as well.

This should match with your ideas as well

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants