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 ].

NameInstrument TypeUnit (UCUM)DescriptionStability
signalr.server.connection.durationHistogramsThe duration of connections on the server. [1]Stable

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

AttributeTypeDescriptionExamplesRequirement LevelStability
signalr.connection.statusstringSignalR HTTP connection closure status.app_shutdown; timeoutRecommendedStable
signalr.transportstringSignalR transport typeweb_sockets; long_pollingRecommendedStable

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.

ValueDescriptionStability
app_shutdownThe connection was closed because the app is shutting down.Stable
normal_closureThe connection was closed normally.Stable
timeoutThe 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.

ValueDescriptionStability
long_pollingLongPolling protocolStable
server_sent_eventsServerSentEvents protocolStable
web_socketsWebSockets protocolStable

Metric: signalr.server.active_connections

NameInstrument TypeUnit (UCUM)DescriptionStability
signalr.server.active_connectionsUpDownCounter{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

AttributeTypeDescriptionExamplesRequirement LevelStability
signalr.connection.statusstringSignalR HTTP connection closure status.app_shutdown; timeoutRecommendedStable
signalr.transportstringSignalR transport typeweb_sockets; long_pollingRecommendedStable

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.

ValueDescriptionStability
app_shutdownThe connection was closed because the app is shutting down.Stable
normal_closureThe connection was closed normally.Stable
timeoutThe 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.

ValueDescriptionStability
long_pollingLongPolling protocolStable
server_sent_eventsServerSentEvents protocolStable
web_socketsWebSockets protocolStable