buildSamplerFromEnv()
in sdk-trace-base package should use parentbased_always_on
if the given OTEL_TRACES_SAMPLER
is unknown
#5476
Labels
bug
Something isn't working
pkg:sdk-trace-base
priority:p2
Bugs and spec inconsistencies which cause telemetry to be incomplete or incorrect
Per https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#general-sdk-configuration the default for
OTEL_TRACES_SAMPLER
is"parentbased_always_on"
.Current process.env handling for
OTEL_TRACES_SAMPLER
does default to that value if the envvar is not specified, or empty. However, if a value is given but is unknown, the code is falling back toalways_on
instead ofparentbased_always_on
:opentelemetry-js/packages/opentelemetry-sdk-trace-base/src/config.ts
Lines 98 to 102 in c27fbc6
The text was updated successfully, but these errors were encountered: