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)Description
signalr.server.connection.durationHistogramsThe duration of connections on the server. [1]

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

AttributeTypeDescriptionExamplesRequirement Level
signalr.connection.statusstringSignalR HTTP connection closure status.app_shutdown; timeoutRecommended
signalr.transportstringSignalR transport typeweb_sockets; long_pollingRecommended

signalr.connection.status MUST be one of the following:

ValueDescription
normal_closureThe connection was closed normally.
timeoutThe connection was closed due to a timeout.
app_shutdownThe connection was closed because the app is shutting down.

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.

ValueDescription
server_sent_eventsServerSentEvents protocol
long_pollingLongPolling protocol
web_socketsWebSockets protocol

Metric: signalr.server.active_connections

NameInstrument TypeUnit (UCUM)Description
signalr.server.active_connectionsUpDownCounter{connection}Number of connections that are currently active on the server. [1]

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

AttributeTypeDescriptionExamplesRequirement Level
signalr.connection.statusstringSignalR HTTP connection closure status.app_shutdown; timeoutRecommended
signalr.transportstringSignalR transport typeweb_sockets; long_pollingRecommended

signalr.connection.status MUST be one of the following:

ValueDescription
normal_closureThe connection was closed normally.
timeoutThe connection was closed due to a timeout.
app_shutdownThe connection was closed because the app is shutting down.

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.

ValueDescription
server_sent_eventsServerSentEvents protocol
long_pollingLongPolling protocol
web_socketsWebSockets protocol