Skip to content

Concurrent HTTP client requests show as parent/child relationship instead of sibling #4655

@jason-kingsmill

Description

@jason-kingsmill

Package

Sentry.AspNetCore

.NET Flavor

.NET Core

.NET Version

8

OS

Any (not platform specific)

OS Version

No response

Development Environment

Visual Studio v17.x

SDK Version

5.16

Self-Hosted Sentry Version

No response

Workload Versions

N/A

UseSentry or SentrySdk.Init call

builder.WebHost.UseSentry(opt =>
{
opt.ApplySerilogScopeToEvents();
opt.MinimumBreadcrumbLevel = Microsoft.Extensions.Logging.LogLevel.Information;
opt.MinimumEventLevel = Microsoft.Extensions.Logging.LogLevel.Error;
opt.DisableDiagnosticSourceIntegration();
opt.Experimental.EnableLogs = true;
opt.UseOpenTelemetry();

// We want to force the sample rate, ignoring any "sampled" headers coming from the API
var configuredRate = builder.Configuration.GetValue<double?>("Sentry:TracesSampleRate") ?? 1.0;
opt.TracesSampler = _ => configuredRate;    

});

Steps to Reproduce

  1. From and starting transaction, make multiple concurrent outbound HttpClient requests

Expected Result

Sentry should show the spans from each request as siblings

Actual Result

Sentry shows all http.client spans as parent/child relationship starting from the first to the last

Image

Note:
We use OpenTelemetry simply so we can gather MassTransit telemetry, which requires disabling Diagnostic Source Integration.
I'm not sure if this is potentially a cause of the issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETPull requests that update .net codeBugSomething isn't workingNeeds Reproduction

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions