Documentation
¶
Overview ¶
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "http" namespace.
Index ¶
- type ClientActiveRequests
- func (m ClientActiveRequests) Add(ctx context.Context, incr int64, serverAddress string, serverPort int, ...)
- func (m ClientActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientActiveRequests) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue
- func (ClientActiveRequests) AttrURLScheme(val string) attribute.KeyValue
- func (ClientActiveRequests) AttrURLTemplate(val string) attribute.KeyValue
- func (ClientActiveRequests) Description() string
- func (m ClientActiveRequests) Inst() metric.Int64UpDownCounter
- func (ClientActiveRequests) Name() string
- func (ClientActiveRequests) Unit() string
- type ClientConnectionDuration
- func (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue
- func (ClientConnectionDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientConnectionDuration) AttrURLScheme(val string) attribute.KeyValue
- func (ClientConnectionDuration) Description() string
- func (m ClientConnectionDuration) Inst() metric.Float64Histogram
- func (ClientConnectionDuration) Name() string
- func (m ClientConnectionDuration) Record(ctx context.Context, val float64, serverAddress string, serverPort int, ...)
- func (m ClientConnectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientConnectionDuration) Unit() string
- type ClientOpenConnections
- func (m ClientOpenConnections) Add(ctx context.Context, incr int64, connectionState ConnectionStateAttr, ...)
- func (m ClientOpenConnections) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue
- func (ClientOpenConnections) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientOpenConnections) AttrURLScheme(val string) attribute.KeyValue
- func (ClientOpenConnections) Description() string
- func (m ClientOpenConnections) Inst() metric.Int64UpDownCounter
- func (ClientOpenConnections) Name() string
- func (ClientOpenConnections) Unit() string
- type ClientRequestBodySize
- func (ClientRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
- func (ClientRequestBodySize) AttrURLScheme(val string) attribute.KeyValue
- func (ClientRequestBodySize) AttrURLTemplate(val string) attribute.KeyValue
- func (ClientRequestBodySize) Description() string
- func (m ClientRequestBodySize) Inst() metric.Int64Histogram
- func (ClientRequestBodySize) Name() string
- func (m ClientRequestBodySize) Record(ctx context.Context, val int64, requestMethod RequestMethodAttr, ...)
- func (m ClientRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ClientRequestBodySize) Unit() string
- type ClientRequestDuration
- func (ClientRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue
- func (ClientRequestDuration) AttrURLScheme(val string) attribute.KeyValue
- func (ClientRequestDuration) AttrURLTemplate(val string) attribute.KeyValue
- func (ClientRequestDuration) Description() string
- func (m ClientRequestDuration) Inst() metric.Float64Histogram
- func (ClientRequestDuration) Name() string
- func (m ClientRequestDuration) Record(ctx context.Context, val float64, requestMethod RequestMethodAttr, ...)
- func (m ClientRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientRequestDuration) Unit() string
- type ClientResponseBodySize
- func (ClientResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
- func (ClientResponseBodySize) AttrURLScheme(val string) attribute.KeyValue
- func (ClientResponseBodySize) AttrURLTemplate(val string) attribute.KeyValue
- func (ClientResponseBodySize) Description() string
- func (m ClientResponseBodySize) Inst() metric.Int64Histogram
- func (ClientResponseBodySize) Name() string
- func (m ClientResponseBodySize) Record(ctx context.Context, val int64, requestMethod RequestMethodAttr, ...)
- func (m ClientResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ClientResponseBodySize) Unit() string
- type ConnectionStateAttr
- type ErrorTypeAttr
- type RequestMethodAttr
- type ServerActiveRequests
- func (m ServerActiveRequests) Add(ctx context.Context, incr int64, requestMethod RequestMethodAttr, ...)
- func (m ServerActiveRequests) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ServerActiveRequests) AttrServerAddress(val string) attribute.KeyValue
- func (ServerActiveRequests) AttrServerPort(val int) attribute.KeyValue
- func (ServerActiveRequests) Description() string
- func (m ServerActiveRequests) Inst() metric.Int64UpDownCounter
- func (ServerActiveRequests) Name() string
- func (ServerActiveRequests) Unit() string
- type ServerRequestBodySize
- func (ServerRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
- func (ServerRequestBodySize) AttrRoute(val string) attribute.KeyValue
- func (ServerRequestBodySize) AttrServerAddress(val string) attribute.KeyValue
- func (ServerRequestBodySize) AttrServerPort(val int) attribute.KeyValue
- func (ServerRequestBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue
- func (ServerRequestBodySize) Description() string
- func (m ServerRequestBodySize) Inst() metric.Int64Histogram
- func (ServerRequestBodySize) Name() string
- func (m ServerRequestBodySize) Record(ctx context.Context, val int64, requestMethod RequestMethodAttr, ...)
- func (m ServerRequestBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ServerRequestBodySize) Unit() string
- type ServerRequestDuration
- func (ServerRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue
- func (ServerRequestDuration) AttrRoute(val string) attribute.KeyValue
- func (ServerRequestDuration) AttrServerAddress(val string) attribute.KeyValue
- func (ServerRequestDuration) AttrServerPort(val int) attribute.KeyValue
- func (ServerRequestDuration) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue
- func (ServerRequestDuration) Description() string
- func (m ServerRequestDuration) Inst() metric.Float64Histogram
- func (ServerRequestDuration) Name() string
- func (m ServerRequestDuration) Record(ctx context.Context, val float64, requestMethod RequestMethodAttr, ...)
- func (m ServerRequestDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ServerRequestDuration) Unit() string
- type ServerResponseBodySize
- func (ServerResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
- func (ServerResponseBodySize) AttrRoute(val string) attribute.KeyValue
- func (ServerResponseBodySize) AttrServerAddress(val string) attribute.KeyValue
- func (ServerResponseBodySize) AttrServerPort(val int) attribute.KeyValue
- func (ServerResponseBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue
- func (ServerResponseBodySize) Description() string
- func (m ServerResponseBodySize) Inst() metric.Int64Histogram
- func (ServerResponseBodySize) Name() string
- func (m ServerResponseBodySize) Record(ctx context.Context, val int64, requestMethod RequestMethodAttr, ...)
- func (m ServerResponseBodySize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ServerResponseBodySize) Unit() string
- type UserAgentSyntheticTypeAttr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientActiveRequests ¶
type ClientActiveRequests struct {
metric.Int64UpDownCounter
}
ClientActiveRequests is an instrument used to record metric values conforming to the "http.client.active_requests" semantic conventions. It represents the number of active HTTP requests.
func NewClientActiveRequests ¶
func NewClientActiveRequests( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (ClientActiveRequests, error)
NewClientActiveRequests returns a new ClientActiveRequests instrument.
func (ClientActiveRequests) Add ¶
func (m ClientActiveRequests) Add( ctx context.Context, incr int64, serverAddress string, serverPort int, attrs ...attribute.KeyValue, )
Add adds incr to the existing count for attrs.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
The serverPort is the server port number.
All additional attrs passed are included in the recorded value.
func (ClientActiveRequests) AttrRequestMethod ¶
func (ClientActiveRequests) AttrRequestMethod(val RequestMethodAttr) attribute.KeyValue
AttrRequestMethod returns an optional attribute for the "http.request.method" semantic convention. It represents the HTTP request method.
func (ClientActiveRequests) AttrURLScheme ¶
func (ClientActiveRequests) AttrURLScheme(val string) attribute.KeyValue
AttrURLScheme returns an optional attribute for the "url.scheme" semantic convention. It represents the URI scheme component identifying the used protocol.
func (ClientActiveRequests) AttrURLTemplate ¶
func (ClientActiveRequests) AttrURLTemplate(val string) attribute.KeyValue
AttrURLTemplate returns an optional attribute for the "url.template" semantic convention. It represents the low-cardinality template of an absolute path reference.
func (ClientActiveRequests) Description ¶
func (ClientActiveRequests) Description() string
Description returns the semantic convention description of the instrument
func (ClientActiveRequests) Inst ¶
func (m ClientActiveRequests) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ClientActiveRequests) Name ¶
func (ClientActiveRequests) Name() string
Name returns the semantic convention name of the instrument.
func (ClientActiveRequests) Unit ¶
func (ClientActiveRequests) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientConnectionDuration ¶
type ClientConnectionDuration struct {
metric.Float64Histogram
}
ClientConnectionDuration is an instrument used to record metric values conforming to the "http.client.connection.duration" semantic conventions. It represents the duration of the successfully established outbound HTTP connections.
func NewClientConnectionDuration ¶
func NewClientConnectionDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientConnectionDuration, error)
NewClientConnectionDuration returns a new ClientConnectionDuration instrument.
func (ClientConnectionDuration) AttrNetworkPeerAddress ¶
func (ClientConnectionDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue
AttrNetworkPeerAddress returns an optional attribute for the "network.peer.address" semantic convention. It represents the peer address of the network connection - IP address or Unix domain socket name.
func (ClientConnectionDuration) AttrNetworkProtocolVersion ¶
func (ClientConnectionDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ClientConnectionDuration) AttrURLScheme ¶
func (ClientConnectionDuration) AttrURLScheme(val string) attribute.KeyValue
AttrURLScheme returns an optional attribute for the "url.scheme" semantic convention. It represents the URI scheme component identifying the used protocol.
func (ClientConnectionDuration) Description ¶
func (ClientConnectionDuration) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionDuration) Inst ¶
func (m ClientConnectionDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientConnectionDuration) Name ¶
func (ClientConnectionDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ClientConnectionDuration) Record ¶
func (m ClientConnectionDuration) Record( ctx context.Context, val float64, serverAddress string, serverPort int, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
The serverPort is the server port number.
All additional attrs passed are included in the recorded value.
func (ClientConnectionDuration) RecordSet ¶
RecordSet records val to the current distribution for set.
func (ClientConnectionDuration) Unit ¶
func (ClientConnectionDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientOpenConnections ¶
type ClientOpenConnections struct {
metric.Int64UpDownCounter
}
ClientOpenConnections is an instrument used to record metric values conforming to the "http.client.open_connections" semantic conventions. It represents the number of outbound HTTP connections that are currently active or idle on the client.
func NewClientOpenConnections ¶
func NewClientOpenConnections( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (ClientOpenConnections, error)
NewClientOpenConnections returns a new ClientOpenConnections instrument.
func (ClientOpenConnections) Add ¶
func (m ClientOpenConnections) Add( ctx context.Context, incr int64, connectionState ConnectionStateAttr, serverAddress string, serverPort int, attrs ...attribute.KeyValue, )
Add adds incr to the existing count for attrs.
The connectionState is the state of the HTTP connection in the HTTP connection pool.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
The serverPort is the server port number.
All additional attrs passed are included in the recorded value.
func (ClientOpenConnections) AttrNetworkPeerAddress ¶
func (ClientOpenConnections) AttrNetworkPeerAddress(val string) attribute.KeyValue
AttrNetworkPeerAddress returns an optional attribute for the "network.peer.address" semantic convention. It represents the peer address of the network connection - IP address or Unix domain socket name.
func (ClientOpenConnections) AttrNetworkProtocolVersion ¶
func (ClientOpenConnections) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ClientOpenConnections) AttrURLScheme ¶
func (ClientOpenConnections) AttrURLScheme(val string) attribute.KeyValue
AttrURLScheme returns an optional attribute for the "url.scheme" semantic convention. It represents the URI scheme component identifying the used protocol.
func (ClientOpenConnections) Description ¶
func (ClientOpenConnections) Description() string
Description returns the semantic convention description of the instrument
func (ClientOpenConnections) Inst ¶
func (m ClientOpenConnections) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ClientOpenConnections) Name ¶
func (ClientOpenConnections) Name() string
Name returns the semantic convention name of the instrument.
func (ClientOpenConnections) Unit ¶
func (ClientOpenConnections) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientRequestBodySize ¶
type ClientRequestBodySize struct {
metric.Int64Histogram
}
ClientRequestBodySize is an instrument used to record metric values conforming to the "http.client.request.body.size" semantic conventions. It represents the size of HTTP client request bodies.
func NewClientRequestBodySize ¶
func NewClientRequestBodySize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientRequestBodySize, error)
NewClientRequestBodySize returns a new ClientRequestBodySize instrument.
func (ClientRequestBodySize) AttrErrorType ¶
func (ClientRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.
func (ClientRequestBodySize) AttrNetworkProtocolName ¶
func (ClientRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
AttrNetworkProtocolName returns an optional attribute for the "network.protocol.name" semantic convention. It represents the OSI application layer or non-OSI equivalent.
func (ClientRequestBodySize) AttrNetworkProtocolVersion ¶
func (ClientRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ClientRequestBodySize) AttrResponseStatusCode ¶
func (ClientRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP response status code.
func (ClientRequestBodySize) AttrURLScheme ¶
func (ClientRequestBodySize) AttrURLScheme(val string) attribute.KeyValue
AttrURLScheme returns an optional attribute for the "url.scheme" semantic convention. It represents the URI scheme component identifying the used protocol.
func (ClientRequestBodySize) AttrURLTemplate ¶
func (ClientRequestBodySize) AttrURLTemplate(val string) attribute.KeyValue
AttrURLTemplate returns an optional attribute for the "url.template" semantic convention. It represents the low-cardinality template of an absolute path reference.
func (ClientRequestBodySize) Description ¶
func (ClientRequestBodySize) Description() string
Description returns the semantic convention description of the instrument
func (ClientRequestBodySize) Inst ¶
func (m ClientRequestBodySize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ClientRequestBodySize) Name ¶
func (ClientRequestBodySize) Name() string
Name returns the semantic convention name of the instrument.
func (ClientRequestBodySize) Record ¶
func (m ClientRequestBodySize) Record( ctx context.Context, val int64, requestMethod RequestMethodAttr, serverAddress string, serverPort int, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The requestMethod is the HTTP request method.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
The serverPort is the server port number.
All additional attrs passed are included in the recorded value.
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ClientRequestBodySize) RecordSet ¶
RecordSet records val to the current distribution for set.
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ClientRequestBodySize) Unit ¶
func (ClientRequestBodySize) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientRequestDuration ¶
type ClientRequestDuration struct {
metric.Float64Histogram
}
ClientRequestDuration is an instrument used to record metric values conforming to the "http.client.request.duration" semantic conventions. It represents the duration of HTTP client requests.
func NewClientRequestDuration ¶
func NewClientRequestDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientRequestDuration, error)
NewClientRequestDuration returns a new ClientRequestDuration instrument.
func (ClientRequestDuration) AttrErrorType ¶
func (ClientRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.
func (ClientRequestDuration) AttrNetworkProtocolName ¶
func (ClientRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
AttrNetworkProtocolName returns an optional attribute for the "network.protocol.name" semantic convention. It represents the OSI application layer or non-OSI equivalent.
func (ClientRequestDuration) AttrNetworkProtocolVersion ¶
func (ClientRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ClientRequestDuration) AttrResponseStatusCode ¶
func (ClientRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP response status code.
func (ClientRequestDuration) AttrURLScheme ¶
func (ClientRequestDuration) AttrURLScheme(val string) attribute.KeyValue
AttrURLScheme returns an optional attribute for the "url.scheme" semantic convention. It represents the URI scheme component identifying the used protocol.
func (ClientRequestDuration) AttrURLTemplate ¶
func (ClientRequestDuration) AttrURLTemplate(val string) attribute.KeyValue
AttrURLTemplate returns an optional attribute for the "url.template" semantic convention. It represents the low-cardinality template of an absolute path reference.
func (ClientRequestDuration) Description ¶
func (ClientRequestDuration) Description() string
Description returns the semantic convention description of the instrument
func (ClientRequestDuration) Inst ¶
func (m ClientRequestDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientRequestDuration) Name ¶
func (ClientRequestDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ClientRequestDuration) Record ¶
func (m ClientRequestDuration) Record( ctx context.Context, val float64, requestMethod RequestMethodAttr, serverAddress string, serverPort int, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The requestMethod is the HTTP request method.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
The serverPort is the server port number.
All additional attrs passed are included in the recorded value.
func (ClientRequestDuration) Unit ¶
func (ClientRequestDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientResponseBodySize ¶
type ClientResponseBodySize struct {
metric.Int64Histogram
}
ClientResponseBodySize is an instrument used to record metric values conforming to the "http.client.response.body.size" semantic conventions. It represents the size of HTTP client response bodies.
func NewClientResponseBodySize ¶
func NewClientResponseBodySize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientResponseBodySize, error)
NewClientResponseBodySize returns a new ClientResponseBodySize instrument.
func (ClientResponseBodySize) AttrErrorType ¶
func (ClientResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.
func (ClientResponseBodySize) AttrNetworkProtocolName ¶
func (ClientResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
AttrNetworkProtocolName returns an optional attribute for the "network.protocol.name" semantic convention. It represents the OSI application layer or non-OSI equivalent.
func (ClientResponseBodySize) AttrNetworkProtocolVersion ¶
func (ClientResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ClientResponseBodySize) AttrResponseStatusCode ¶
func (ClientResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP response status code.
func (ClientResponseBodySize) AttrURLScheme ¶
func (ClientResponseBodySize) AttrURLScheme(val string) attribute.KeyValue
AttrURLScheme returns an optional attribute for the "url.scheme" semantic convention. It represents the URI scheme component identifying the used protocol.
func (ClientResponseBodySize) AttrURLTemplate ¶
func (ClientResponseBodySize) AttrURLTemplate(val string) attribute.KeyValue
AttrURLTemplate returns an optional attribute for the "url.template" semantic convention. It represents the low-cardinality template of an absolute path reference.
func (ClientResponseBodySize) Description ¶
func (ClientResponseBodySize) Description() string
Description returns the semantic convention description of the instrument
func (ClientResponseBodySize) Inst ¶
func (m ClientResponseBodySize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ClientResponseBodySize) Name ¶
func (ClientResponseBodySize) Name() string
Name returns the semantic convention name of the instrument.
func (ClientResponseBodySize) Record ¶
func (m ClientResponseBodySize) Record( ctx context.Context, val int64, requestMethod RequestMethodAttr, serverAddress string, serverPort int, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The requestMethod is the HTTP request method.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
The serverPort is the server port number.
All additional attrs passed are included in the recorded value.
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ClientResponseBodySize) RecordSet ¶
RecordSet records val to the current distribution for set.
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ClientResponseBodySize) Unit ¶
func (ClientResponseBodySize) Unit() string
Unit returns the semantic convention unit of the instrument
type ConnectionStateAttr ¶
type ConnectionStateAttr string
ConnectionStateAttr is an attribute conforming to the http.connection.state semantic conventions. It represents the state of the HTTP connection in the HTTP connection pool.
var ( // ConnectionStateActive is the active state. ConnectionStateActive ConnectionStateAttr = "active" // ConnectionStateIdle is the idle state. ConnectionStateIdle ConnectionStateAttr = "idle" )
type ErrorTypeAttr ¶
type ErrorTypeAttr string
ErrorTypeAttr is an attribute conforming to the error.type semantic conventions. It represents the describes a class of error the operation ended with.
var ( // ErrorTypeOther is a fallback error value to be used when the instrumentation // doesn't define a custom value. ErrorTypeOther ErrorTypeAttr = "_OTHER" )
type RequestMethodAttr ¶
type RequestMethodAttr string
RequestMethodAttr is an attribute conforming to the http.request.method semantic conventions. It represents the HTTP request method.
var ( // RequestMethodConnect is the CONNECT method. RequestMethodConnect RequestMethodAttr = "CONNECT" // RequestMethodDelete is the DELETE method. RequestMethodDelete RequestMethodAttr = "DELETE" // RequestMethodGet is the GET method. RequestMethodGet RequestMethodAttr = "GET" // RequestMethodHead is the HEAD method. RequestMethodHead RequestMethodAttr = "HEAD" // RequestMethodOptions is the OPTIONS method. RequestMethodOptions RequestMethodAttr = "OPTIONS" // RequestMethodPatch is the PATCH method. RequestMethodPatch RequestMethodAttr = "PATCH" // RequestMethodPost is the POST method. RequestMethodPost RequestMethodAttr = "POST" // RequestMethodPut is the PUT method. RequestMethodPut RequestMethodAttr = "PUT" // RequestMethodTrace is the TRACE method. RequestMethodTrace RequestMethodAttr = "TRACE" // RequestMethodOther is the any HTTP method that the instrumentation has no // prior knowledge of. RequestMethodOther RequestMethodAttr = "_OTHER" )
type ServerActiveRequests ¶
type ServerActiveRequests struct {
metric.Int64UpDownCounter
}
ServerActiveRequests is an instrument used to record metric values conforming to the "http.server.active_requests" semantic conventions. It represents the number of active HTTP server requests.
func NewServerActiveRequests ¶
func NewServerActiveRequests( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (ServerActiveRequests, error)
NewServerActiveRequests returns a new ServerActiveRequests instrument.
func (ServerActiveRequests) Add ¶
func (m ServerActiveRequests) Add( ctx context.Context, incr int64, requestMethod RequestMethodAttr, urlScheme string, attrs ...attribute.KeyValue, )
Add adds incr to the existing count for attrs.
The requestMethod is the HTTP request method.
The urlScheme is the the URI scheme component identifying the used protocol.
All additional attrs passed are included in the recorded value.
func (ServerActiveRequests) AttrServerAddress ¶
func (ServerActiveRequests) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the name of the local HTTP server that received the request.
func (ServerActiveRequests) AttrServerPort ¶
func (ServerActiveRequests) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the port of the local HTTP server that received the request.
func (ServerActiveRequests) Description ¶
func (ServerActiveRequests) Description() string
Description returns the semantic convention description of the instrument
func (ServerActiveRequests) Inst ¶
func (m ServerActiveRequests) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ServerActiveRequests) Name ¶
func (ServerActiveRequests) Name() string
Name returns the semantic convention name of the instrument.
func (ServerActiveRequests) Unit ¶
func (ServerActiveRequests) Unit() string
Unit returns the semantic convention unit of the instrument
type ServerRequestBodySize ¶
type ServerRequestBodySize struct {
metric.Int64Histogram
}
ServerRequestBodySize is an instrument used to record metric values conforming to the "http.server.request.body.size" semantic conventions. It represents the size of HTTP server request bodies.
func NewServerRequestBodySize ¶
func NewServerRequestBodySize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerRequestBodySize, error)
NewServerRequestBodySize returns a new ServerRequestBodySize instrument.
func (ServerRequestBodySize) AttrErrorType ¶
func (ServerRequestBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.
func (ServerRequestBodySize) AttrNetworkProtocolName ¶
func (ServerRequestBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
AttrNetworkProtocolName returns an optional attribute for the "network.protocol.name" semantic convention. It represents the OSI application layer or non-OSI equivalent.
func (ServerRequestBodySize) AttrNetworkProtocolVersion ¶
func (ServerRequestBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ServerRequestBodySize) AttrResponseStatusCode ¶
func (ServerRequestBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP response status code.
func (ServerRequestBodySize) AttrRoute ¶
func (ServerRequestBodySize) AttrRoute(val string) attribute.KeyValue
AttrRoute returns an optional attribute for the "http.route" semantic convention. It represents the matched route, that is, the path template in the format used by the respective server framework.
func (ServerRequestBodySize) AttrServerAddress ¶
func (ServerRequestBodySize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the name of the local HTTP server that received the request.
func (ServerRequestBodySize) AttrServerPort ¶
func (ServerRequestBodySize) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the port of the local HTTP server that received the request.
func (ServerRequestBodySize) AttrUserAgentSyntheticType ¶
func (ServerRequestBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue
AttrUserAgentSyntheticType returns an optional attribute for the "user_agent.synthetic.type" semantic convention. It represents the specifies the category of synthetic traffic, such as tests or bots.
func (ServerRequestBodySize) Description ¶
func (ServerRequestBodySize) Description() string
Description returns the semantic convention description of the instrument
func (ServerRequestBodySize) Inst ¶
func (m ServerRequestBodySize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ServerRequestBodySize) Name ¶
func (ServerRequestBodySize) Name() string
Name returns the semantic convention name of the instrument.
func (ServerRequestBodySize) Record ¶
func (m ServerRequestBodySize) Record( ctx context.Context, val int64, requestMethod RequestMethodAttr, urlScheme string, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The requestMethod is the HTTP request method.
The urlScheme is the the URI scheme component identifying the used protocol.
All additional attrs passed are included in the recorded value.
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ServerRequestBodySize) RecordSet ¶
RecordSet records val to the current distribution for set.
The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ServerRequestBodySize) Unit ¶
func (ServerRequestBodySize) Unit() string
Unit returns the semantic convention unit of the instrument
type ServerRequestDuration ¶
type ServerRequestDuration struct {
metric.Float64Histogram
}
ServerRequestDuration is an instrument used to record metric values conforming to the "http.server.request.duration" semantic conventions. It represents the duration of HTTP server requests.
func NewServerRequestDuration ¶
func NewServerRequestDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ServerRequestDuration, error)
NewServerRequestDuration returns a new ServerRequestDuration instrument.
func (ServerRequestDuration) AttrErrorType ¶
func (ServerRequestDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.
func (ServerRequestDuration) AttrNetworkProtocolName ¶
func (ServerRequestDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
AttrNetworkProtocolName returns an optional attribute for the "network.protocol.name" semantic convention. It represents the OSI application layer or non-OSI equivalent.
func (ServerRequestDuration) AttrNetworkProtocolVersion ¶
func (ServerRequestDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ServerRequestDuration) AttrResponseStatusCode ¶
func (ServerRequestDuration) AttrResponseStatusCode(val int) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP response status code.
func (ServerRequestDuration) AttrRoute ¶
func (ServerRequestDuration) AttrRoute(val string) attribute.KeyValue
AttrRoute returns an optional attribute for the "http.route" semantic convention. It represents the matched route, that is, the path template in the format used by the respective server framework.
func (ServerRequestDuration) AttrServerAddress ¶
func (ServerRequestDuration) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the name of the local HTTP server that received the request.
func (ServerRequestDuration) AttrServerPort ¶
func (ServerRequestDuration) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the port of the local HTTP server that received the request.
func (ServerRequestDuration) AttrUserAgentSyntheticType ¶
func (ServerRequestDuration) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue
AttrUserAgentSyntheticType returns an optional attribute for the "user_agent.synthetic.type" semantic convention. It represents the specifies the category of synthetic traffic, such as tests or bots.
func (ServerRequestDuration) Description ¶
func (ServerRequestDuration) Description() string
Description returns the semantic convention description of the instrument
func (ServerRequestDuration) Inst ¶
func (m ServerRequestDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ServerRequestDuration) Name ¶
func (ServerRequestDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ServerRequestDuration) Record ¶
func (m ServerRequestDuration) Record( ctx context.Context, val float64, requestMethod RequestMethodAttr, urlScheme string, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The requestMethod is the HTTP request method.
The urlScheme is the the URI scheme component identifying the used protocol.
All additional attrs passed are included in the recorded value.
func (ServerRequestDuration) Unit ¶
func (ServerRequestDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type ServerResponseBodySize ¶
type ServerResponseBodySize struct {
metric.Int64Histogram
}
ServerResponseBodySize is an instrument used to record metric values conforming to the "http.server.response.body.size" semantic conventions. It represents the size of HTTP server response bodies.
func NewServerResponseBodySize ¶
func NewServerResponseBodySize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerResponseBodySize, error)
NewServerResponseBodySize returns a new ServerResponseBodySize instrument.
func (ServerResponseBodySize) AttrErrorType ¶
func (ServerResponseBodySize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.
func (ServerResponseBodySize) AttrNetworkProtocolName ¶
func (ServerResponseBodySize) AttrNetworkProtocolName(val string) attribute.KeyValue
AttrNetworkProtocolName returns an optional attribute for the "network.protocol.name" semantic convention. It represents the OSI application layer or non-OSI equivalent.
func (ServerResponseBodySize) AttrNetworkProtocolVersion ¶
func (ServerResponseBodySize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
AttrNetworkProtocolVersion returns an optional attribute for the "network.protocol.version" semantic convention. It represents the actual version of the protocol used for network communication.
func (ServerResponseBodySize) AttrResponseStatusCode ¶
func (ServerResponseBodySize) AttrResponseStatusCode(val int) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP response status code.
func (ServerResponseBodySize) AttrRoute ¶
func (ServerResponseBodySize) AttrRoute(val string) attribute.KeyValue
AttrRoute returns an optional attribute for the "http.route" semantic convention. It represents the matched route, that is, the path template in the format used by the respective server framework.
func (ServerResponseBodySize) AttrServerAddress ¶
func (ServerResponseBodySize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the name of the local HTTP server that received the request.
func (ServerResponseBodySize) AttrServerPort ¶
func (ServerResponseBodySize) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the port of the local HTTP server that received the request.
func (ServerResponseBodySize) AttrUserAgentSyntheticType ¶
func (ServerResponseBodySize) AttrUserAgentSyntheticType(val UserAgentSyntheticTypeAttr) attribute.KeyValue
AttrUserAgentSyntheticType returns an optional attribute for the "user_agent.synthetic.type" semantic convention. It represents the specifies the category of synthetic traffic, such as tests or bots.
func (ServerResponseBodySize) Description ¶
func (ServerResponseBodySize) Description() string
Description returns the semantic convention description of the instrument
func (ServerResponseBodySize) Inst ¶
func (m ServerResponseBodySize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ServerResponseBodySize) Name ¶
func (ServerResponseBodySize) Name() string
Name returns the semantic convention name of the instrument.
func (ServerResponseBodySize) Record ¶
func (m ServerResponseBodySize) Record( ctx context.Context, val int64, requestMethod RequestMethodAttr, urlScheme string, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The requestMethod is the HTTP request method.
The urlScheme is the the URI scheme component identifying the used protocol.
All additional attrs passed are included in the recorded value.
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ServerResponseBodySize) RecordSet ¶
RecordSet records val to the current distribution for set.
The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the Content-Length header. For requests using transport encoding, this should be the compressed size.
func (ServerResponseBodySize) Unit ¶
func (ServerResponseBodySize) Unit() string
Unit returns the semantic convention unit of the instrument
type UserAgentSyntheticTypeAttr ¶
type UserAgentSyntheticTypeAttr string
UserAgentSyntheticTypeAttr is an attribute conforming to the user_agent.synthetic.type semantic conventions. It represents the specifies the category of synthetic traffic, such as tests or bots.
var ( // UserAgentSyntheticTypeBot is the bot source. UserAgentSyntheticTypeBot UserAgentSyntheticTypeAttr = "bot" // UserAgentSyntheticTypeTest is the synthetic test source. UserAgentSyntheticTypeTest UserAgentSyntheticTypeAttr = "test" )