Skip to content

[H/3] Distributed Tracing / Telemetry #104783

@ManickaP

Description

@ManickaP

Right now, we emit very short telemetry / activity "wait for connection" for every H/3 request, even if the request is immediately handled by the connection and doesn't wait. Follow queueStartingTimestamp in:

long queueStartingTimestamp = HttpTelemetry.Log.IsEnabled() || Settings._metrics!.RequestsQueueDuration.Enabled ? Stopwatch.GetTimestamp() : 0;

We shouldn't emit those events (if the connection can handle the request immediately). We do have _availableRequestStreamsCount in H3 connection which we could use:

Also, right now the code differs from H/2 pool because of the internal waiting in S.N.Quic OpenOutboundStreamAsync.

connection = await http3ConnectionWaiter.WaitWithCancellationAsync(cancellationToken).ConfigureAwait(false);

vs
connection = await http2ConnectionWaiter.WaitForConnectionAsync(request, this, async, cancellationToken).ConfigureAwait(false);

So if we can bring the code closer to H/2 with this change, it would be an added bonus.

Original discussion: #103922 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Net.HttpenhancementProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions