Skip to content

Separate long-lived subscriptions from slow-span diagnostics #18

Description

@badcuban

Priority: P1

Why

Diagnostics slow-span counts should point at operations that need performance work. Right now long-lived WebSocket subscriptions are counted as slow spans because their duration is the lifetime of the subscription, not the latency of a completed operation.

Diagnostics evidence

From C:\Users\Will\.t3\userdata\logs\server.trace.ndjson* on May 26, 2026:

  • Slow-span aggregation includes spans like ws.rpc.orchestration.subscribeThread, RpcClient.orchestration.subscribeThread, ws.rpc.subscribeVcsStatus, ws.rpc.subscribeServerConfig, and http.server GET with durations around 1,696,000 ms.
  • These are stream/subscription lifetimes ending when the client disconnects or refreshes, not necessarily performance regressions.
  • The same trace window had 784 spans over 1s and 85 spans over 5s, so subscription lifetimes can hide actionable slow operations.

Acceptance criteria

  • Diagnostics separates long-lived streaming/subscription spans from request/operation latency spans.
  • Slow-span counts prioritize completed bounded operations.
  • Subscription spans can still be visible in a separate section if useful for lifecycle debugging.
  • Add tests around slow-span classification for WebSocket/RPC subscriptions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequested improvement or new capability.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions