-
Notifications
You must be signed in to change notification settings - Fork 895
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 OTEL_EXPORTER environment variable #943
Add OTEL_EXPORTER environment variable #943
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.
Is there a mention in the spec as to what the known values that should be used to identify exporters are and how exporters should register these values? That would be useful for anyone implementing additional exporters.
would it make more sense for every exporter to keep Having |
There are two alternatives suggested above. I like both of them, except around handling of the default value.
Wondering if anyone has suggestions how to handle default value better in either of these cases? Or should we stick with the single environment variable |
I prefer the third alternative, which is currently written in PR :) |
In case we go with
Exporter names seem sort of like propagator names, not sure if there's any convention we can follow from those? |
For some reason |
@trask you got me on default values. Single variable is better from this perspective. As for naming, I again tend to lean to separate variables for metrics and spans. It feels like two separate pieces of configuration semantically. Since I also ❤️ naming, should we get PM to this PR to help nail the desired semantic of this config settings ;-)? (edit: I assumed "because I ❤️ naming" was a sarcasm. If not, than mine is =)) |
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.
Thanks for the updates, this LGTM
Mine was intentionally ambiguous 😂. I have a complicated relationship with naming. |
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
Last edit was a day ago, so plan to merge tomorrow morning unless somebody will comment with blocking concerns |
Other than OTLP, most other exporters expect an explicit value for "service name". OTLP expects a |
* Add OTEL_EXPORTER environment variable * feedback * Add note about otlp=otlp_span,otlp_metric
Fixes #710
Changes
Adds
OTEL_EXPORTER
environment variable to select the exporter to be used.Adds
OTEL_EXPORTER_OTLP_ENDPOINT
environment variable to configure the ingest endpoint for both OTLP spans and metrics.Notes
I added
OTEL_EXPORTER_OTLP_ENDPOINT
in this PR because I think it makes the default valueOTEL_EXPORTER=otlp
make more sense.(It also happens to be the env var that the Java SDK uses currently, and seems simpler for most OTLP users, who will be sending spans and metrics to the same endpoint)
An alternative would be to specify the default value as
OTEL_EXPORTER=otlp_span,otlp_metric
.I went with the singular
OTEL_EXPORTER
over the pluralOTEL_EXPORTERS
, since the common use case is to configure just one exporter and so this seems less confusing.