Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ The following metrics are currently supported:
* [Kestrel](dotnet-kestrel-metrics.md): Semantic Conventions for Kestrel web server *metrics*.
* [SignalR](dotnet-signalr-metrics.md): Semantic Conventions for SignalR server *metrics*.
* [Runtime](/docs/runtime/dotnet-metrics.md): Semantic conventions for .NET Runtime *metrics*.
* [Blazor](dotnet-blazor-metrics.md): Semantic Conventions for Blazor UI framework *metrics*.
8 changes: 8 additions & 0 deletions docs/dotnet/dotnet-blazor-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Semantic conventions for Blazor UI framework

**Status**: [Development][DocumentStatus]

This article defines semantic conventions for Blazor metrics emitted by .NET components.

<!-- semconv metric.aspnetcore.components.navigate -->
<!-- endsemconv -->
127 changes: 127 additions & 0 deletions model/aspnetcore/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,130 @@ groups:
attributes:
- ref: aspnetcore.rate_limiting.result
requirement_level: required

# blazor components
- id: metric.aspnetcore.components.navigate
type: metric
metric_name: aspnetcore.components.navigate
stability: development
brief: Total number of route changes.
instrument: counter
unit: "{route}"
note: >
Meter name: `Microsoft.AspNetCore.Components`; Added in: ASP.NET Core 10.0
More about [Blazor routing](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/routing)
attributes:
- ref: aspnetcore.components.type
requirement_level: required
- ref: aspnetcore.components.route
requirement_level: required

- id: metric.aspnetcore.components.handle_event.duration
type: metric
metric_name: aspnetcore.components.handle_event.duration
stability: development
brief: Duration of processing browser event handler.
instrument: histogram
unit: "s"
note: >
Meter name: `Microsoft.AspNetCore.Components`; Added in: ASP.NET Core 10.0
More about [Blazor event handling](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/event-handling)
attributes:
- ref: aspnetcore.components.type
requirement_level: required
- ref: code.function.name
requirement_level: required
- ref: aspnetcore.components.attribute.name
requirement_level: required
- ref: error.type
brief: The full name of exception type.
examples: ['System.OperationCanceledException', 'Contoso.MyException']
requirement_level:
conditionally_required: If handler has ended with an error.

- id: metric.aspnetcore.components.update_parameters.duration
type: metric
metric_name: aspnetcore.components.update_parameters.duration
stability: development.duration
brief: Duration of processing component parameters.
instrument: histogram
unit: "s"
note: >
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
More about [Blazor parameters](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/cascading-values-and-parameters)
attributes:
- ref: aspnetcore.components.type
requirement_level: required
- ref: error.type
brief: The full name of exception type.
examples: ['System.OperationCanceledException', 'Contoso.MyException']
requirement_level:
conditionally_required: If handler has ended with an error.

- id: metric.aspnetcore.components.render_diff.duration
type: metric
metric_name: aspnetcore.components.render_diff.duration
stability: development
brief: Duration of rendering difference batch between previous and current HTML.
instrument: histogram
unit: "s"
note: >
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
More about [Blazor rendering](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/rendering)
attributes:
- ref: error.type
brief: The full name of exception type.
examples: ['System.OperationCanceledException', 'Contoso.MyException']
requirement_level:
conditionally_required: If handler has ended with an error.

- id: metric.aspnetcore.components.render_diff.size
type: metric
metric_name: aspnetcore.components.render_diff.size
stability: development
brief: Size of rendering difference batch between previous and current HTML.
instrument: histogram
unit: "element"
note: >
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
More about [Blazor rendering](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/rendering)
attributes:
- ref: error.type
brief: The full name of exception type.
examples: ['System.OperationCanceledException', 'Contoso.MyException']
requirement_level:
conditionally_required: If handler has ended with an error.

# Blazor circuits
- id: metric.aspnetcore.components.circuit.duration
type: metric
metric_name: aspnetcore.components.circuit.duration
stability: development
brief: Duration of circuit including time after re-connect.
instrument: histogram
unit: "s"
note: >
Meter name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
More about [Blazor circuits](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr)

- id: metric.aspnetcore.components.circuit.active
type: metric
metric_name: aspnetcore.components.circuit.active
stability: development
brief: Number of circuits in memory, both connected and waiting for re-connect.
instrument: updowncounter
unit: "{circuit}"
note: >
Meter name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
More about [Blazor circuits](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr)

- id: metric.aspnetcore.components.circuit.connected
type: metric
metric_name: aspnetcore.components.circuit.connected
stability: development
brief: Number of connected circuits.
instrument: updowncounter
unit: "{circuit}"
note: >
Meter name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
More about [Blazor circuits](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr)
30 changes: 30 additions & 0 deletions model/aspnetcore/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,33 @@ groups:
stability: stable
brief: ASP.NET Core exception middleware handling result
examples: ["handled", "unhandled"]
- id: aspnetcore.components.type
type: string
stability: development
brief: Full type name of the Blazor component.
note: >
This is full name of the C# component class, including the namespace.
More about [Blazor event handling](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/event-handling)
examples: ["Contoso.Weather"]
- id: aspnetcore.components.attribute.name
type: string
stability: development
brief: Attribute name of the event handler in Blazor component.
note: >
This is name of the binding attribute in the component markup.
More about [Blazor event handling](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/event-handling)
examples: ["onclick"]
- id: aspnetcore.components.route
type: string
stability: development
brief: Segment of the URL that is matched to a Blazor @page component.
note: >
This route pattern is used to match the URL to the component.
More about [Blazor routing](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/routing)
examples: ["/weather", "/counter"]
- id: aspnetcore.components.circuit.id
type: string
stability: development
brief: Id of the Blazor circuit.
note: More about [Blazor circuits](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr)
examples: ["ztOXUZxeJvS2b3ioeZ68bal8RQmQehui02CtZER"]
55 changes: 55 additions & 0 deletions model/aspnetcore/spans.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
groups:
- id: span.Microsoft.AspNetCore.Components.Server.Circuits.StartCircuit
type: span
span_kind: internal
brief:
note: >
ActivitySource name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
More about [Blazor circuits](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr)
stability: development
attributes:
- ref: aspnetcore.components.circuit.id
requirement_level: required
- ref: error.type
requirement_level:
conditionally_required: if the circuit initialization failed
- id: span.Microsoft.AspNetCore.Components.Navigate
type: span
span_kind: internal
brief:
note: >
ActivitySource name: `Microsoft.AspNetCore.Components`; Added in: ASP.NET Core 10.0
More about [Blazor routing](https://learn.microsoft.com/en-us/aspnet/core/blazor/fundamentals/routing)
stability: development
attributes:
- ref: aspnetcore.components.circuit.id
requirement_level: required
- ref: aspnetcore.components.type
requirement_level: required
- ref: aspnetcore.components.route
requirement_level: required
- ref: error.type
requirement_level:
conditionally_required: if the circuit initialization failed
- id: span.Microsoft.AspNetCore.Components.HandleEvent
type: span
span_kind: internal
brief:
note: >
ActivitySource name: `Microsoft.AspNetCore.Components`; Added in: ASP.NET Core 10.0
More about [Blazor event handling](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/event-handling)
stability: development
attributes:
- ref: aspnetcore.components.circuit.id
requirement_level: required
- ref: aspnetcore.components.type
requirement_level: required
- ref: aspnetcore.components.route
requirement_level: required
- ref: code.function.name
requirement_level: required
- ref: aspnetcore.components.attribute.name
requirement_level: required
- ref: error.type
requirement_level:
conditionally_required: if the circuit initialization failed