open-telemetry / opentelemetry.io

The OpenTelemetry website and documentation
https://opentelemetry.io
Creative Commons Attribution 4.0 International
512 stars 1.09k forks source link

[meta] Document environment variables in Sampling #3325

Open pellared opened 11 months ago

pellared commented 11 months ago

I think we should also document setting the environment variable in a top-level section in this guide. That can be especially helpful for development since you can just use the default, but then have production do something different.

Originally posted by @cartermp in https://github.com/open-telemetry/opentelemetry.io/pull/3318#pullrequestreview-1647152522

Also https://github.com/open-telemetry/opentelemetry.io/pull/3318#discussion_r1338917095


(edit by @svrnm)

Tracking:

pellared commented 11 months ago

Resource: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/configuration/sdk-environment-variables.md

We should also probably call out that using trace.WithSampler overrides the env vars.

svrnm commented 11 months ago

is this only a go thing?

pellared commented 11 months ago

IMO not only Go. I think that the default value is wrongly defined in other languages. And also I think the clarification is needed for all languages.

svrnm commented 11 months ago

Ok. I removed the "Go" from the title :)

svrnm commented 10 months ago

@pellared turning this into a meta issue since it is relevant for all languages

nerudadhich commented 5 months ago

Hi @svrnm, I would like to start working on this. Will start from Java first. Do we have any ideal format that we need to follow for this ? Any example from existing one's ?

svrnm commented 5 months ago

Hi @svrnm, I would like to start working on this. Will start from Java first. Do we have any ideal format that we need to follow for this ? Any example from existing one's ?

Apologies for the late reply, I was out of office. We currently have https://github.com/open-telemetry/opentelemetry.io/pull/4199 open, so it might need that to be closed before we can add some words about variables. You can review that PR if you like and create a follow up when merged.