Skip to content

[blazor] Diagnostic traces - OTEL names review #62751

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

Merged
merged 2 commits into from
Jul 17, 2025

Conversation

pavelsavara
Copy link
Member

@pavelsavara pavelsavara commented Jul 16, 2025

  • rename RouteChange ->Navigate
  • don't propagate HTTP/SignalR links to event traces
  • rename internal methods to match above

Fixes #62556

- don't propagate HTTP/SignalR links to event traces
@pavelsavara pavelsavara added this to the 10.0-preview7 milestone Jul 16, 2025
@pavelsavara pavelsavara added the area-blazor Includes: Blazor, Razor Components label Jul 16, 2025
@pavelsavara pavelsavara changed the title [blazor] Diagnostic traces - OTEL names [blazor] Diagnostic traces - OTEL names review Jul 16, 2025
@pavelsavara pavelsavara marked this pull request as ready for review July 16, 2025 14:06
@Copilot Copilot AI review requested due to automatic review settings July 16, 2025 14:06
@pavelsavara pavelsavara requested a review from a team as a code owner July 16, 2025 14:06
@pavelsavara pavelsavara requested a review from JamesNK July 16, 2025 14:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR standardizes OTEL activity names and method signatures for Blazor diagnostic tracing by renaming “RouteChange” to “Navigate”, updating internal method names to match, and adjusting how HTTP/SignalR links are handled in circuit traces.

  • Renamed navigation-related constants and methods from Route→Navigate and event methods to HandleEvent.
  • Changed CircuitActivitySource to directly add HTTP/SignalR links to activities instead of storing them.
  • Updated callsites in tests, Router, and Renderer to use the new method names.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Components/Server/test/Circuits/CircuitActivitySourceTest.cs Adjusted test expectations for link propagation on circuit start
src/Components/Server/src/Circuits/CircuitActivitySource.cs Switched from storing HTTP/SignalR contexts to adding links
src/Components/Components/test/ComponentsActivitySourceTest.cs Renamed route and event activity start/stop methods
src/Components/Components/src/Routing/Router.cs Updated navigation activity stop calls
src/Components/Components/src/RenderTree/Renderer.cs Updated event activity start/stop calls
src/Components/Components/src/ComponentsActivitySource.cs Renamed constants and methods for navigation and events
Comments suppressed due to low confidence (1)

src/Components/Components/test/ComponentsActivitySourceTest.cs:103

  • In the event activity success test, you should call StopHandleEventActivity(...) instead of StopNavigateActivity(...) to correctly stop the event trace.
        componentsActivitySource.StopNavigateActivity(activityHandle, null);

@pavelsavara pavelsavara self-assigned this Jul 16, 2025
@pavelsavara pavelsavara requested a review from noahfalk July 16, 2025 14:12
@pavelsavara pavelsavara merged commit bc106c9 into dotnet:main Jul 17, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[API Proposal] Diagnostic traces for Blazor
2 participants