Skip to content

All spans not attached to parent transaction #863

@ollipa

Description

@ollipa

How do you use Sentry?

Sentry SaaS (sentry.io)

SDK version

0.41.0

Steps to reproduce

We have multiple Rust applications where we have carefully built the tracing to make sure that all spans are attached to one parent transaction. We noticed that the spans are not grouped correctly anymore and many functions annotated with #[instrument] create their own transaction in Sentry.

I tested multiple versions and it seems that the issue has started in v0.38.0 and persists in v0.41.0.

Our application spans async tasks like this:

tokio::task::spawn(
    async move { handle_task().await }.in_current_span().bind_hub(Hub::current())
)

Sentry is installed with these features:

sentry = { version = "0.41.0", default-features = false, features = [
    "backtrace",
    "contexts",
    "panic",
    "anyhow",
    "tracing",
    "reqwest",
    "rustls",
] }

Expected result

Spans should be attached to parent transaction/span

Actual result

Spans are not attached to parent transaction/span and multiple transactions are sent to Sentry when only one transaction should be created.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions