Skip to content

Expand Blazor logging and diagnostics #11792

Closed
@SteveSandersonMS

Description

@SteveSandersonMS

This is part of #10472

Ensure developers can trace all the major things that happen in a server-side Blazor application (e.g., circuits starting/ending) with a special focus on all incoming calls from the client (event notifications, JSInterop calls, renderbatch ACKs).

  • Outbound JS interop calls (.NET to JS)
    • Call sent
    • Reply received (with successful result or exception)
    • Cancelled due to timeout
    • To avoid noise, we should distinguish framework-originated calls from application-originated calls. This might be achieved by having a separate InternalInvokeAsync on RemoteJSRuntime that only the framework calls and is not on the IJSRuntime interface.
  • Inbound JS interop calls (JS to .NET)
    • Call received
    • Reply sent (with successful result or exception)
    • To avoid noise, we should distinguish framework-originated calls from application-originated calls.
  • Incoming UI event notifications
  • Rendering
    • Instantiating a component
    • Disposing a component
    • Rendering a component
    • Sending a render batch to the client
    • Receiving acknowledgement of a render batch from the client
  • Circuits
    • Circuit created
    • Circuit connected
    • Circuit disconnected
    • Circuit evicted
    • Unhandled exception
  • Routing
    • Navigation occurred, whether to a matching @page component or if no match was found

This assumes it's possible to do such fine-grained logging without any meaningful perf cost (at least, when the logging level is such that the messages are being skipped). If this does turn out to have a meaningful perf cost, we wouldn't want to do all the per-component parts under "rendering".

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing one

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions