Skip to content

tracing(csharp): cloudfetch.download_slot_acquired carries no wait_duration — slot contention invisible #483

@eric-wang-1990

Description

@eric-wang-1990

Severity: Low

Observation

DownloadFilesAsync emits a cloudfetch.download_slot_acquired event every time a download slot is acquired from the parallelism pool. Under CloudFetchStressTests (24-file / 241MB downloads) the event fires 252 times.

But the event carries no wait_duration_ms tag — so it's impossible to tell whether a slot was acquired immediately or whether the call blocked waiting for another download to finish. Under high parallelism, this is exactly the metric you'd want to diagnose "downloads are slow because they're queued."

Suggested fix

Capture Stopwatch around slot.WaitAsync() and add wait_duration_ms tag to the cloudfetch.download_slot_acquired event. Also consider queue_depth (count of pending downloads).

Evidence

  • Traces.CloudFetchStressTests.20260527_154205/ — 252 cloudfetch.download_slot_acquired events, none with wait_duration
  • Tier 1 finding: CloudFetchMemoryBufferManager has no dedicated span / event for back-pressure either

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions