-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[blazor] Diagnostic tracing - feedback #62286
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
Conversation
Not asking to change anything, but this is going to be interesting, since we aren't really going to see the method for the form handling events given that |
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.
Looks good, I have an additional suggestion for us to consider, but otherwise looks good.
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.
Looks great!
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.
Looks great!
Sorry, I know this is late, but one suggestion I missed before was to have Blazor update the DisplayName of the enclosing SignalR activity. It seems like this would avoid creating extra top-level traces while preserving the unique naming you were hoping for. For example instead of doing (conceptually): Activity signalRActivity = Activity.Current;
Activity.Current = null;
Activity blazorActivity = ComponentActivitySource.StartActivity(...);
activity.DisplayName = $"Route {route ?? "[unknown path]"} -> {componentType ?? "[unknown component]"}";
DoBlazorWork();
activity.Stop();
Activity.Current = signalRActivity; You could do: Activity signalRActivity = Activity.Current;
signalRActivity.DisplayName = $"Blazor Route {route ?? "[unknown path]"} -> {componentType ?? "[unknown component]"}";
DoBlazorWork(); Thoughts? |
@
I don't think that would actually work. The reason being that a circuit expands more than one SignalR connection (for example when a client gets disconnected and reconnects). I realize now we might not be handling that scenario entirely correcty. |
Changes
Circuit
related tracing into newCircuitActivitySource
CircuitStart
trace toMicrosoft.AspNetCore.Components.Server.Circuits
namespaceComponentsActivityLinkStore
internal helperInternalsVisibleTo
and it's consequencesContributes to #62145
Contributes to #62254
interactive whole application
without signalR traces

side by side with SignalR

Links in the circuit trace

interactive page in non-interactive application
side by side with SignalR

non-interactive page, form submit