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

time,sync: make Sleep and BatchSemaphore instrumentation explicit roots #6727

Merged
merged 1 commit into from
Jul 29, 2024

Commits on Jul 26, 2024

  1. time,sync: make Sleep and BatchSemaphore instrumentation explicit roots

    When instrumenting resources in Tokio, a span is created for each
    resource. Previously, all resources inherited the currently active span
    as their parent (tracing default). However, this would keep that parent
    span alive until the resource (and its span) were dropped. This is often
    not correct, as a resource may be created in a task and then sent
    elsewhere, while the originating task ends.
    
    This artificial extension of the parent span's lifetime would make it
    look like that task was still alive (but idle) in any system reading the
    tracing instrumentation in Tokio, for example Tokio Console as reported
    in tokio-rs/console#345.
    
    In #6107, most of the existing resource spans were updated to
    make them explicit roots, so they have no contextual parent. However,
    2. were missed:
    - `Sleep`
    - `BatchSemaphore`
    
    This change alters the resource spans for those 2 resources to also make
    them explicit roots.
    hds committed Jul 26, 2024
    Configuration menu
    Copy the full SHA
    a632f76 View commit details
    Browse the repository at this point in the history