Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

signalrconv

v1.47.0
go.opentelemetry.io/otel/semconv/v1.32.0/signalrconv

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

27 matches

Top ↑

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

Types

ConnectionStatusAttr

type ConnectionStatusAttr string

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

ConnectionStatusNormalClosure (3 declarations)

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"
)

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.

NewServerActiveConnections

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

NewServerActiveConnections returns a new ServerActiveConnections instrument.

ServerActiveConnections.Add

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

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

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

ServerActiveConnections.AttrConnectionStatus

func (ServerActiveConnections) AttrConnectionStatus(val ConnectionStatusAttr) attribute.KeyValue

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

ServerActiveConnections.AttrTransport

func (ServerActiveConnections) AttrTransport(val TransportAttr) attribute.KeyValue

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

ServerActiveConnections.Description

func (ServerActiveConnections) Description() string

Description returns the semantic convention description of the instrument

ServerActiveConnections.Inst

func (m ServerActiveConnections) Inst() metric.Int64UpDownCounter

Inst returns the underlying metric instrument.

ServerActiveConnections.Name

func (ServerActiveConnections) Name() string

Name returns the semantic convention name of the instrument.

ServerActiveConnections.Unit

func (ServerActiveConnections) Unit() string

Unit returns the semantic convention unit of the instrument

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.

NewServerConnectionDuration

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

NewServerConnectionDuration returns a new ServerConnectionDuration instrument.

ServerConnectionDuration.AttrConnectionStatus

func (ServerConnectionDuration) AttrConnectionStatus(val ConnectionStatusAttr) attribute.KeyValue

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

ServerConnectionDuration.AttrTransport

func (ServerConnectionDuration) AttrTransport(val TransportAttr) attribute.KeyValue

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

ServerConnectionDuration.Description

func (ServerConnectionDuration) Description() string

Description returns the semantic convention description of the instrument

ServerConnectionDuration.Inst

func (m ServerConnectionDuration) Inst() metric.Float64Histogram

Inst returns the underlying metric instrument.

ServerConnectionDuration.Name

func (ServerConnectionDuration) Name() string

Name returns the semantic convention name of the instrument.

ServerConnectionDuration.Record

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

Record records val to the current distribution.

All additional attrs passed are included in the recorded value.

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

ServerConnectionDuration.Unit

func (ServerConnectionDuration) Unit() string

Unit returns the semantic convention unit of the instrument

TransportAttr

type TransportAttr string

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

TransportServerSentEvents (3 declarations)

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"
)

Dependency graph