-
Notifications
You must be signed in to change notification settings - Fork 792
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
Spec compliant SamplingResult support #1033
Labels
Comments
Ah.. just noticed a TODO in the code doc. Anyway, I'm going for this. |
pichlermarc
pushed a commit
to dynatrace-oss-contrib/opentelemetry-js
that referenced
this issue
Dec 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to spec here about span sampling (https:/open-telemetry/opentelemetry-specification/blob/master/specification/trace/sdk.md#sampling), there are three flags representing how a span was exported:
NOT_RECORD
, same as https:/open-telemetry/opentelemetry-js/blob/master/packages/opentelemetry-api/src/trace/trace_flags.ts#L22, do nothing with the span.RECORD
, record span events but do not export span.RECORD_AND_SAMPLED
, record span events, and export span.As for now,
api.Sampler.shouldSample
returns a boolean, representing sampling or not. It should return an enum to support all flags in spec.The text was updated successfully, but these errors were encountered: