-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Inconsistency between X_ENDPOINT and WithEndpoint #3730
Comments
Deprecation in favor of |
Looking at the specification, I think introducing That prevents us from doing option 2. |
According the the spec, for gRPC protocol, neither
The gRPC flavor should work without providing |
I am favor of not doing any breaking change. I find the existing documentation is good enough:
We could rather consider adding an additional option like |
SIG meeting: We can add Before |
I think that we can simply improve the documentation to make it clear that value set via While I am perfectly aware that it is inconvenient I have not heard a lot of complains about the current API so I would prefer to not increase the number of options. |
I'll add a complaint. Lost an hour of my day until I picked up this thread. I'll leave this comment as a little "frustration counter" |
@JakeCooper I tried my best to improve the docs in #4695. I also plan to improve the https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp#WithEndpoint documentation of to include something like
(based on https://pkg.go.dev/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp#WithEndpoint) Do you have any other proposals on how to avoid the frustration for future adopters? |
@dmathieu What do you think about updating the issue description to propose adding e.g. |
Description
When using the OTLP exporter, the
WithEndpoint
option requires an hostname, without the protocol.However, the
X_ENDPOINT
environment variables requires an endpoint, including the protocol.This can be misleading, as both config have very similar names, but expect different values.
Per the specification, the environment variable currently has the proper behavior.
I'm not seeing any spec for the config though.
I think we could solve this two ways:
WithEndpoint
to require a protocol, and be the same as the environment variable.WithEndpoint
, and replace it withWithHostname
.WithEndpoint
, and introduce a newWithEndpointURL
method.See #3726
The text was updated successfully, but these errors were encountered: