Add long running activity tag for SignalR connections#32084
Conversation
|
Should this be moved to the websocket middleware instead of signalr's websocket transport. |
|
I thought we we're doing to the header in addition to setting a tag on the activity? |
|
@cijothomas I assume this will be sufficient for AI to exclude long-running SigalR requests from regular request statistics? |
Why? |
@shirhatti This will help in AI to exclude long-running requests of Signal-R.
With the current change we have to create and hold the request telemetry in the heap till the |
That's impossible. StartActivity is called way too early for that |
|
@davidfowl So that I don't have to use DiagnosticsListener, get the HttpContext and then read the response headers. If I'm an instrumentation library I just want to have all the info on the Activity |
|
Also @rajkumar-rangaraj ,we're adding a response header, not a request header 😄 |
Yes. I reviewed it. As I wanted an update in BeginRequest asked for change in request header. |
This isn't possible. |
I thought you might want to make the WebSocket middleware a little more raw. Instrumentation should treat all WebSocket requests as long-running to begin with. |
9431c63 to
aade853
Compare
aade853 to
dba5b20
Compare
|
Updated |
|
nit: Fix the PR title 😄 |
|
|
||
| private async Task ExecuteAsync(HttpContext context, ConnectionDelegate connectionDelegate, HttpConnectionDispatcherOptions options, ConnectionLogScope logScope) | ||
| { | ||
| // set a tag to allow Application Performance Management tools to differentiate long running requests for reporting purposes |
There was a problem hiding this comment.
I haven't seen APM written out like this before
There was a problem hiding this comment.
I didn't know what it stood for and in 1 year I definitely wont remember.
Fixes #29699