You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
orhttps
(e.g.https://localhost:4317
).Neither the HTTP nor the GRPC driver supports this.
OtlpHttp
OtlpGrpc
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 schemehttp
.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!
The text was updated successfully, but these errors were encountered: