package signalrconv

import "go.opentelemetry.io/otel/semconv/v1.40.0/signalrconv"

Package signalrconv provides types and functionality for OpenTelemetry semantic conventions in the "signalr" namespace.

Index

Types

type ConnectionStatusAttr

type ConnectionStatusAttr string

ConnectionStatusAttr is an attribute conforming to the signalr.connection.status semantic conventions. It represents the signalR HTTP connection closure status.

var (
	// ConnectionStatusNormalClosure is the connection was closed normally.
	ConnectionStatusNormalClosure ConnectionStatusAttr = "normal_closure"
	// ConnectionStatusTimeout is the connection was closed due to a timeout.
	ConnectionStatusTimeout ConnectionStatusAttr = "timeout"
	// ConnectionStatusAppShutdown is the connection was closed because the app is
	// shutting down.
	ConnectionStatusAppShutdown ConnectionStatusAttr = "app_shutdown"
)

type ServerActiveConnections

type ServerActiveConnections struct {
	metric.Int64UpDownCounter
}

ServerActiveConnections is an instrument used to record metric values conforming to the "signalr.server.active_connections" semantic conventions. It represents the number of connections that are currently active on the server.

func NewServerActiveConnections

func NewServerActiveConnections(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ServerActiveConnections, error)

NewServerActiveConnections returns a new ServerActiveConnections instrument.

func (ServerActiveConnections) Add

func (m ServerActiveConnections) Add(
	ctx context.Context,
	incr int64,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0

func (ServerActiveConnections) AddSet

func (m ServerActiveConnections) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0

func (ServerActiveConnections) AttrConnectionStatus

AttrConnectionStatus returns an optional attribute for the "signalr.connection.status" semantic convention. It represents the signalR HTTP connection closure status.

func (ServerActiveConnections) AttrTransport

AttrTransport returns an optional attribute for the "signalr.transport" semantic convention. It represents the SignalR transport type.

func (ServerActiveConnections) Description

func (ServerActiveConnections) Description() string

Description returns the semantic convention description of the instrument

func (ServerActiveConnections) Inst

Inst returns the underlying metric instrument.

func (ServerActiveConnections) Name

Name returns the semantic convention name of the instrument.

func (ServerActiveConnections) Unit

Unit returns the semantic convention unit of the instrument

type ServerConnectionDuration

type ServerConnectionDuration struct {
	metric.Float64Histogram
}

ServerConnectionDuration is an instrument used to record metric values conforming to the "signalr.server.connection.duration" semantic conventions. It represents the duration of connections on the server.

func NewServerConnectionDuration

func NewServerConnectionDuration(
	m metric.Meter,
	opt ...metric.Float64HistogramOption,
) (ServerConnectionDuration, error)

NewServerConnectionDuration returns a new ServerConnectionDuration instrument.

func (ServerConnectionDuration) AttrConnectionStatus

AttrConnectionStatus returns an optional attribute for the "signalr.connection.status" semantic convention. It represents the signalR HTTP connection closure status.

func (ServerConnectionDuration) AttrTransport

AttrTransport returns an optional attribute for the "signalr.transport" semantic convention. It represents the SignalR transport type.

func (ServerConnectionDuration) Description

func (ServerConnectionDuration) Description() string

Description returns the semantic convention description of the instrument

func (ServerConnectionDuration) Inst

Inst returns the underlying metric instrument.

func (ServerConnectionDuration) Name

Name returns the semantic convention name of the instrument.

func (ServerConnectionDuration) Record

func (m ServerConnectionDuration) Record(
	ctx context.Context,
	val float64,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0

func (ServerConnectionDuration) RecordSet

func (m ServerConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)

RecordSet records val to the current distribution for set.

Meter name: `Microsoft.AspNetCore.Http.Connections`; Added in: ASP.NET Core 8.0

func (ServerConnectionDuration) Unit

Unit returns the semantic convention unit of the instrument

type TransportAttr

type TransportAttr string

TransportAttr is an attribute conforming to the signalr.transport semantic conventions. It represents the SignalR transport type.

var (
	// TransportServerSentEvents is the serverSentEvents protocol.
	TransportServerSentEvents TransportAttr = "server_sent_events"
	// TransportLongPolling is the longPolling protocol.
	TransportLongPolling TransportAttr = "long_polling"
	// TransportWebSockets is the webSockets protocol.
	TransportWebSockets TransportAttr = "web_sockets"
)

Source Files

metric.go

Version
v1.43.0 (latest)
Published
Apr 3, 2026
Platform
linux/amd64
Imports
5 packages
Last checked
3 hours ago

Tools for package owners.