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

exporter/zipkin: adding support for env var OTEL_EXPORTER_ZIPKIN_ENDPOINT #1064

Merged
merged 8 commits into from Sep 9, 2020

Conversation

codeboten
Copy link
Contributor

Description

As per spec, adding support for env var:OTEL_EXPORTER_ZIPKIN_ENDPOINT

Fixes #1055

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added

@codeboten codeboten requested a review from a team as a code owner September 2, 2020 04:14
Copy link
Contributor

@ffe4 ffe4 left a 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)
Copy link
Contributor

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.

Copy link
Contributor Author

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

https://github.com/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-exporter-zipkin/src/zipkin.ts#L44

Go

https://github.com/open-telemetry/opentelemetry-go/blob/master/exporters/trace/zipkin/zipkin.go#L37

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@codeboten
Copy link
Contributor Author

LGTM but shouldn't we also mention the environment variable in the documentation?

Good point, updated the docs

@codeboten codeboten added the release:required-for-ga To be resolved before GA release label Sep 3, 2020
@codeboten codeboten added this to Reviewer Approved in GA Burndown Sep 4, 2020
@codeboten codeboten moved this from Reviewer Approved to In Progress in GA Burndown Sep 4, 2020
GA Burndown automation moved this from In Progress to Reviewer Approved Sep 9, 2020
@codeboten codeboten merged commit 370cc6b into open-telemetry:master Sep 9, 2020
GA Burndown automation moved this from Reviewer Approved to Done Sep 9, 2020
srikanthccv pushed a commit to srikanthccv/opentelemetry-python that referenced this pull request Nov 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:required-for-ga To be resolved before GA release
Projects
No open projects
GA Burndown
  
Done
Development

Successfully merging this pull request may close these issues.

Support env variables for Zipkin exporter
5 participants