open-telemetry / semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Apache License 2.0
266 stars 169 forks source link

Proposal: Standard property to flag a Span as "expected long running" #1503

Open johncrim opened 1 year ago

johncrim commented 1 year ago

What are you trying to achieve?

I need to track requests/connections/dependencies that are expected to have a long duration (minutes/hours), and exclude them from performance analysis, computation of average response time, and slow request/dependency detection. In short, I think it would be very useful to have a standard way to flag a Span as "exclude from performance analysis; this will take a while by design".

Examples include WebSocket connections and GRPC connections, which can last for minutes/hours. In both, a Span for the connection acts as a useful container for other interactions between both ends of the connection.

Spans within an "expected long running" span should not be interpreted as also long running.

Additional context.

This came up as part of https://github.com/microsoft/ApplicationInsights-dotnet/issues/2746 .

In the absence of this attribute, APM tools and query writers have to come up with ways to identify operations that should be excluded from performance analysis; such approaches may be application specific and likely brittle relative to having a well-known property.

For now, I'm using http.long_running b/c it seems to be standardized in Application Insights; though long_running: true would probably be better.

iblancasa commented 3 days ago

Is there anything we can do to promote this?

I think this can be interesting for environments running AI stuff (or training systems).