Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -15,5 +15,6 @@ The following metrics are currently supported:
* [HTTP](dotnet-http-metrics.md): Semantic Conventions for HTTP client and server *metrics*.
* [Kestrel](dotnet-kestrel-metrics.md): Semantic Conventions for Kestrel web server *metrics*.
* [SignalR](dotnet-signalr-metrics.md): Semantic Conventions for SignalR server *metrics*.
* [Blazor](dotnet-blazor-metrics.md): Semantic Conventions for Blazor UI framework *metrics*.

[DocumentStatus]: https://opentelemetry.io/docs/specs/otel/document-status
11 changes: 11 additions & 0 deletions docs/dotnet/dotnet-blazor-metrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--- Hugo front matter used to generate the website version of this page:
linkTitle: Blazor
--->

# Semantic conventions for Blazor UI framework

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

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

TODO - is this generated ?
Copy link
Member

Choose a reason for hiding this comment

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

yes, check out https://github.com/open-telemetry/semantic-conventions/blob/main/CONTRIBUTING.md#2-update-the-markdown-files and you can use other md files as examples, e.g.

<!-- semconv metric.aspnetcore.routing.match_attempts -->

we don't have it yaml (yet), but we should document recommended boundaries for histograms - e.g. like here https://github.com/open-telemetry/semantic-conventions/blob/main/docs/dotnet/dotnet-http-metrics.md#metric-httpclientrequesttime_in_queue

Copy link
Author

Choose a reason for hiding this comment

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

I'm doing something wrong

pavelsavara@SAVARA-DESKTOP:~/dev/semantic-conventions$ make table-generation attribute-registry-generation
docker run --rm \
        -u 1000:1000 \
        --mount 'type=bind,source=/home/pavelsavara/dev/semantic-conventions/templates,target=/home/weaver/templates,readonly' \
        --mount 'type=bind,source=/home/pavelsavara/dev/semantic-conventions/model,target=/home/weaver/source,readonly' \
        --mount 'type=bind,source=/home/pavelsavara/dev/semantic-conventions/docs,target=/home/weaver/target' \
        docker.io/otel/weaver:v0.16.1@sha256:5ca4901b460217604ddb83feaca05238e2b016a226ecfb9b87a95555918a03af registry update-markdown \
        --registry=/home/weaver/source \
        -Dregistry_base_url=/docs/registry/ \
        --templates=/home/weaver/templates \
        --target=markdown \
        --future \
        /home/weaver/target
ℹ No registry manifest found: /home/weaver/source/registry_manifest.yaml

Diagnostic report:

invalid_semconv_group

  × The following YAML snippet does not match any of the allowed schemas
  │ (anyOf, see help section).
  help: Specifies the stability of the semantic convention. Note that, if
        stability is missing but deprecated is present, it will automatically
        set the stability to deprecated. If deprecated is present and
        stability differs from deprecated, this will result in an error.

174 changes: 174 additions & 0 deletions model/aspnetcore/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ groups:
- ref: aspnetcore.rate_limiting.policy
requirement_level:
conditionally_required: if the matched endpoint for the request had a rate-limiting policy.
- id: aspnetcore.components.metrics.attributes
type: attribute_group
brief: Blazor metrics attributes

- id: aspnetcore.components.lifecycle.metrics.attributes
type: attribute_group
brief: Blazor metrics attributes

- id: aspnetcore.components.circuits.metrics.attributes
type: attribute_group
brief: Blazor circuits metrics attributes

# routing
- id: metric.aspnetcore.routing.match_attempts
Expand Down Expand Up @@ -114,3 +125,166 @@ groups:
attributes:
- ref: aspnetcore.rate_limiting.result
requirement_level: required

# blazor components
- id: metric.aspnetcore.components.navigation
type: metric
metric_name: aspnetcore.components.navigation
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
extends: aspnetcore.components.metrics.attributes
attributes:
- ref: aspnetcore.components.type
requirement_level: required
- ref: aspnetcore.components.route
requirement_level: required

- id: metric.aspnetcore.components.event.duration
type: metric
metric_name: aspnetcore.components.event.duration
stability: development
brief: Duration of processing browser event.
instrument: histogram
unit: "s"
note: |
Meter name: `Microsoft.AspNetCore.Components`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.metrics.attributes
attributes:
- ref: aspnetcore.components.type
requirement_level: required
- ref: aspnetcore.components.method
requirement_level: required
- ref: aspnetcore.components.attribute.name
requirement_level: required

- id: metric.aspnetcore.components.event.exceptions
type: metric
metric_name: aspnetcore.components.event.exceptions
stability: development
brief: Total number of exceptions during browser event processing.
instrument: counter
unit: "{exception}"
note: |
Meter name: `Microsoft.AspNetCore.Components`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.metrics.attributes
attributes:
- ref: aspnetcore.components.type
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: required

- id: metric.aspnetcore.components.update_parameters.duration
type: metric
metric_name: aspnetcore.components.update_parameters.duration
stability: development
brief: Duration of processing component parameters.
instrument: histogram
unit: "s"
note: |
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.lifecycle.metrics.attributes
attributes:
- ref: aspnetcore.components.type
requirement_level: required

- id: metric.aspnetcore.components.update_parameters.exceptions
type: metric
metric_name: aspnetcore.components.update_parameters.exceptions
stability: development
brief: Total number of exceptions during processing component parameters.
instrument: counter
unit: "{exception}"
note: |
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.lifecycle.metrics.attributes
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: required

- id: metric.aspnetcore.components.rendering.batch.duration
type: metric
metric_name: aspnetcore.components.rendering.batch.duration
stability: development
brief: Duration of rendering batch.
instrument: histogram
unit: "s"
note: |
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.lifecycle.metrics.attributes
attributes:
- ref: aspnetcore.components.diff.approximate.length
requirement_level: required

- id: metric.aspnetcore.components.rendering.batch.exceptions
type: metric
metric_name: aspnetcore.components.rendering.batch.exceptions
stability: development
brief: Total number of exceptions during batch rendering.
instrument: counter
unit: "{exception}"
note: |
Meter name: `Microsoft.AspNetCore.Components.Lifecycle`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.lifecycle.metrics.attributes
attributes:
- ref: error.type
brief: The full name of exception type.
examples: ['System.OperationCanceledException', 'Contoso.MyException']
requirement_level: required

# Blazor circuits
- id: metric.aspnetcore.components.circuits.count
type: metric
metric_name: aspnetcore.components.circuits.count
stability: development
brief: Total number of circuits.
instrument: counter
unit: "{circuit}"
note: |
Meter name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.circuits.metrics.attributes

- id: metric.aspnetcore.components.circuits.active_circuits
type: metric
metric_name: aspnetcore.components.circuits.active_circuits
stability: development
brief: Number of active circuits.
instrument: updowncounter
unit: "{circuit}"
note: |
Meter name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.circuits.metrics.attributes

- id: metric.aspnetcore.components.circuits.connected_circuits
type: metric
metric_name: aspnetcore.components.circuits.connected_circuits
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
extends: aspnetcore.components.circuits.metrics.attributes

- id: metric.aspnetcore.components.circuits.duration
type: metric
metric_name: aspnetcore.components.circuits.duration
stability: development
brief: Duration of circuit.
instrument: histogram
unit: "s"
note: |
Meter name: `Microsoft.AspNetCore.Components.Server.Circuits`; Added in: ASP.NET Core 10.0
extends: aspnetcore.components.circuits.metrics.attributes

25 changes: 25 additions & 0 deletions model/aspnetcore/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,28 @@ 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.
examples: ["Contoso.Weather"]
- id: aspnetcore.components.method
type: string
stability: development
brief: Method name of the event handler in Blazor component.
examples: ["IncrementCount"]
- id: aspnetcore.components.attribute.name
type: string
stability: development
brief: Attribute name of the event handler in Blazor component.
examples: ["onclick"]
- id: aspnetcore.components.route
type: string
stability: development
brief: Segment of the URL that is matched to a Blazor @page component.
examples: ["/weather", "/counter"]
- id: aspnetcore.components.diff.approximate.length
type: int
stability: development
brief: Bucketed length of the diff in Blazor rendering pipeline.
examples: [10, 100, 1000]
Loading