Skip to content
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

fix: OB-35469 add subscription request parent span as child of disco… #334

Merged
merged 1 commit into from
Sep 4, 2024

Commits on Sep 3, 2024

  1. OB-35469: fix: add subscription request parent span as child of disco…

    …very request, and simplify invocaton call stack
    
    In HandleSQS, the context is being injected from the SQS event, when the lambda is triggered by a SQS request. This means that the HandleRequest from the
    Subscription request, which is properly part of another trace, is assuming the parent trace of the Discovery Request.
    
    Hence, the Discover call “steals” the spans from the Subscriber, at least, all of the spans that are descendant from the HandleRequest call of the Subscribe request. That leaves only the parent span of Subscriber, which is created (and thus has context provided to it) before we extract the context from the SQS event. Thus, it shows up as its own trace.
    
    Wrapping the OTEL handler wrapper (which is what makes the first span in the trace) with another handler that will add context from the SQS event if the payload is of that format means that
    the first span should also get the context from the discovery request.
    obs-gh-virjramakrishnan committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    21c529c View commit details
    Browse the repository at this point in the history