-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add long running activity tag for SignalR connections #32084
Conversation
src/SignalR/common/Http.Connections/test/ServerSentEventsTests.cs
Outdated
Show resolved
Hide resolved
src/SignalR/common/Http.Connections/src/Internal/Transports/CustomHeaderNames.cs
Outdated
Show resolved
Hide resolved
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 😄 |
src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs
Show resolved
Hide resolved
@@ -115,6 +115,9 @@ public async Task ExecuteNegotiateAsync(HttpContext context, HttpConnectionDispa | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't seen APM written out like this before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know what it stood for and in 1 year I definitely wont remember.
Fixes #29699