Skip to content

Investigate and fix trace propagation behaviour when ignoring spans #22262

Description

@Lms24

When span streaming is enabled, the ignoreSpansoption has an influence on how we propagate traces to downstream services.

Scenario: An incoming trace is sampled positively. The current SDK is configured for span streaming.

Cases:

  • Segment span is ignored: the SDK should propagate a negative sampling decision to ending up with a trace where the current SDK's segment is entirely missing but downstream services would sample positively.
    • This is analogous to using tracesSampler and returning 0 instead of using samplingContext.inheritOrSampleWith(0).
  • Child span is ignored: the SDK should propagate the segment's (i.e. positive) sampling decision. This also applies when http.client spans themselves are ignored.

Currently, this is untested behaviour. We need to write tests and apply fixes if the actual behaviour diverges.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions