-
Notifications
You must be signed in to change notification settings - Fork 671
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
exporter/zipkin: adding support for env var OTEL_EXPORTER_ZIPKIN_ENDPOINT #1064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but shouldn't we also mention the environment variable in the documentation?
) | ||
self.url = os.environ.get("OTEL_EXPORTER_ZIPKIN_ENDPOINT", DEFAULT_URL) | ||
|
||
url = "{}://{}:{}{}".format(protocol, host_name, port, endpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think default value for protocol should be https
. We can have a special case to use http
as a default when endpoint == DEFAULT_ENDPOINT
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kinda wondering if the configuration parameters should just be a URL instead of protocol/host/port/endpoint. Looking at the other implementations, it looks like that is how they've implemented it. This would also simplify supporting that env variable.
JS
Go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
I think that makes sense. My only concern is how users can discover the path part of the URL. If a user knows their zipkin endpoints is available at https://zipkin.corp.com
, would they know or remember to add :9411
and /api/v2/spans
? Perhaps documenting the default value in zipkin exporter docs would be enough of an indication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going with documenting the default value for now.
Good point, updated the docs |
Description
As per spec, adding support for env var:
OTEL_EXPORTER_ZIPKIN_ENDPOINT
Fixes #1055
Type of change
Checklist: