Skip to content

Latest commit

 

History

History
112 lines (80 loc) · 6.18 KB

dotnet-signalr-metrics.md

File metadata and controls

112 lines (80 loc) · 6.18 KB

Semantic conventions for SignalR server metrics

Status: Stable

This article defines semantic conventions for SignalR metrics emitted by .NET components and runtime.

Metric: signalr.server.connection.duration

this metric SHOULD be specified with ExplicitBucketBoundaries of [ 0.01, 0.02, 0.05, 0.1, 0.2, 0.5, 1, 2, 5, 10, 30, 60, 120, 300 ].

Name Instrument Type Unit (UCUM) Description Stability
signalr.server.connection.duration Histogram s The duration of connections on the server. [1] Stable

[1]: Meter name: Microsoft.AspNetCore.Http.Connections; Added in: ASP.NET Core 8.0

Attribute Type Description Examples Requirement Level Stability
signalr.connection.status string SignalR HTTP connection closure status. app_shutdown; timeout Recommended Stable
signalr.transport string SignalR transport type web_sockets; long_polling Recommended Stable

signalr.connection.status has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
app_shutdown The connection was closed because the app is shutting down. Stable
normal_closure The connection was closed normally. Stable
timeout The connection was closed due to a timeout. Stable

signalr.transport has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
long_polling LongPolling protocol Stable
server_sent_events ServerSentEvents protocol Stable
web_sockets WebSockets protocol Stable

Metric: signalr.server.active_connections

Name Instrument Type Unit (UCUM) Description Stability
signalr.server.active_connections UpDownCounter {connection} Number of connections that are currently active on the server. [1] Stable

[1]: Meter name: Microsoft.AspNetCore.Http.Connections; Added in: ASP.NET Core 8.0

Attribute Type Description Examples Requirement Level Stability
signalr.connection.status string SignalR HTTP connection closure status. app_shutdown; timeout Recommended Stable
signalr.transport string SignalR transport type web_sockets; long_polling Recommended Stable

signalr.connection.status has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
app_shutdown The connection was closed because the app is shutting down. Stable
normal_closure The connection was closed normally. Stable
timeout The connection was closed due to a timeout. Stable

signalr.transport has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
long_polling LongPolling protocol Stable
server_sent_events ServerSentEvents protocol Stable
web_sockets WebSockets protocol Stable