Documentation
¶
Overview ¶
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "signalr" namespace.
Index ¶
- type ConnectionStatusAttr
- type ServerActiveConnections
- func (m ServerActiveConnections) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (ServerActiveConnections) AttrConnectionStatus(val ConnectionStatusAttr) attribute.KeyValue
- func (ServerActiveConnections) AttrTransport(val TransportAttr) attribute.KeyValue
- func (ServerActiveConnections) Description() string
- func (m ServerActiveConnections) Inst() metric.Int64UpDownCounter
- func (ServerActiveConnections) Name() string
- func (ServerActiveConnections) Unit() string
- type ServerConnectionDuration
- func (ServerConnectionDuration) AttrConnectionStatus(val ConnectionStatusAttr) attribute.KeyValue
- func (ServerConnectionDuration) AttrTransport(val TransportAttr) attribute.KeyValue
- func (ServerConnectionDuration) Description() string
- func (m ServerConnectionDuration) Inst() metric.Float64Histogram
- func (ServerConnectionDuration) Name() string
- func (m ServerConnectionDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
- func (ServerConnectionDuration) Unit() string
- type TransportAttr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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.
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) 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.
func (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.
func (ServerActiveConnections) Description ¶
func (ServerActiveConnections) Description() string
Description returns the semantic convention description of the instrument
func (ServerActiveConnections) Inst ¶
func (m ServerActiveConnections) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ServerActiveConnections) Name ¶
func (ServerActiveConnections) Name() string
Name returns the semantic convention name of the instrument.
func (ServerActiveConnections) Unit ¶
func (ServerActiveConnections) Unit() string
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 ¶
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.
func (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.
func (ServerConnectionDuration) Description ¶
func (ServerConnectionDuration) Description() string
Description returns the semantic convention description of the instrument
func (ServerConnectionDuration) Inst ¶
func (m ServerConnectionDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ServerConnectionDuration) Name ¶
func (ServerConnectionDuration) Name() string
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.
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) Unit ¶
func (ServerConnectionDuration) Unit() string
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" )