-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Blazor - rendering metrics #61516
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
Blazor - rendering metrics #61516
Conversation
6f6a498
to
51c936d
Compare
@@ -90,6 +92,10 @@ public Renderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, | |||
_logger = loggerFactory.CreateLogger("Microsoft.AspNetCore.Components.RenderTree.Renderer"); | |||
_componentFactory = new ComponentFactory(componentActivator, this); | |||
|
|||
// TODO register RenderingMetrics as singleton in DI |
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.
It would be good to register RenderingMetrics
as singleton. But I think it should be done in one of the "Extensions" helpers and I'm not sure which. This could be done in next PR when @javiercn is back.
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.
There is one place for server https://github.com/dotnet/aspnetcore/blob/main/src/Components/Endpoints/src/DependencyInjection/RazorComponentsServiceCollectionExtensions.cs#L36 and one for WebAssembly https://github.com/dotnet/aspnetcore/blob/main/src/Components/WebAssembly/WebAssembly/src/Hosting/WebAssemblyHostBuilder.cs#L299
@@ -90,6 +92,10 @@ public Renderer(IServiceProvider serviceProvider, ILoggerFactory loggerFactory, | |||
_logger = loggerFactory.CreateLogger("Microsoft.AspNetCore.Components.RenderTree.Renderer"); | |||
_componentFactory = new ComponentFactory(componentActivator, this); | |||
|
|||
// TODO register RenderingMetrics as singleton in DI |
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.
There is one place for server https://github.com/dotnet/aspnetcore/blob/main/src/Components/Endpoints/src/DependencyInjection/RazorComponentsServiceCollectionExtensions.cs#L36 and one for WebAssembly https://github.com/dotnet/aspnetcore/blob/main/src/Components/WebAssembly/WebAssembly/src/Hosting/WebAssemblyHostBuilder.cs#L299
/ba-g CI timeout is #60989 |
Blazor - rendering metrics
new
Microsoft.AspNetCore.Components.Rendering
metercomponent.type
which isGetType().FullName
of the component being renderedaspnetcore.components.rendering.count
aspnetcore.components.rendering.active_renders
aspnetcore.components.rendering.duration
new
Microsoft.AspNetCore.Components.Server.Circuits
meteraspnetcore.components.circuits.count
aspnetcore.components.circuits.active_circuits
aspnetcore.components.circuits.connected_circuits
aspnetcore.components.circuits.duration
How to enable with OpenTelemetry/Aspire
Fixes #53613