package rpcconv
import "go.opentelemetry.io/otel/semconv/v1.39.0/rpcconv"
Package rpcconv provides types and functionality for OpenTelemetry semantic conventions in the "rpc" namespace.
Index ¶
- type ClientCallDuration
- func NewClientCallDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientCallDuration, error)
- func (ClientCallDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientCallDuration) AttrMethod(val string) attribute.KeyValue
- func (ClientCallDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientCallDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientCallDuration) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ClientCallDuration) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ClientCallDuration) AttrServerAddress(val string) attribute.KeyValue
- func (ClientCallDuration) AttrServerPort(val int) attribute.KeyValue
- func (ClientCallDuration) Description() string
- func (m ClientCallDuration) Inst() metric.Float64Histogram
- func (ClientCallDuration) Name() string
- func (m ClientCallDuration) Record( ctx context.Context, val float64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
- func (m ClientCallDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientCallDuration) Unit() string
- type ClientRequestSize
- func NewClientRequestSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientRequestSize, error)
- func (ClientRequestSize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientRequestSize) AttrMethod(val string) attribute.KeyValue
- func (ClientRequestSize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientRequestSize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientRequestSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ClientRequestSize) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ClientRequestSize) AttrServerAddress(val string) attribute.KeyValue
- func (ClientRequestSize) AttrServerPort(val int) attribute.KeyValue
- func (ClientRequestSize) Description() string
- func (m ClientRequestSize) Inst() metric.Int64Histogram
- func (ClientRequestSize) Name() string
- func (m ClientRequestSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
- func (m ClientRequestSize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ClientRequestSize) Unit() string
- type ClientResponseSize
- func NewClientResponseSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientResponseSize, error)
- func (ClientResponseSize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientResponseSize) AttrMethod(val string) attribute.KeyValue
- func (ClientResponseSize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientResponseSize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientResponseSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ClientResponseSize) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ClientResponseSize) AttrServerAddress(val string) attribute.KeyValue
- func (ClientResponseSize) AttrServerPort(val int) attribute.KeyValue
- func (ClientResponseSize) Description() string
- func (m ClientResponseSize) Inst() metric.Int64Histogram
- func (ClientResponseSize) Name() string
- func (m ClientResponseSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
- func (m ClientResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ClientResponseSize) Unit() string
- type ErrorTypeAttr
- type NetworkTransportAttr
- type ServerCallDuration
- func NewServerCallDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ServerCallDuration, error)
- func (ServerCallDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerCallDuration) AttrMethod(val string) attribute.KeyValue
- func (ServerCallDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerCallDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerCallDuration) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ServerCallDuration) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ServerCallDuration) AttrServerAddress(val string) attribute.KeyValue
- func (ServerCallDuration) AttrServerPort(val int) attribute.KeyValue
- func (ServerCallDuration) Description() string
- func (m ServerCallDuration) Inst() metric.Float64Histogram
- func (ServerCallDuration) Name() string
- func (m ServerCallDuration) Record( ctx context.Context, val float64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
- func (m ServerCallDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ServerCallDuration) Unit() string
- type ServerRequestSize
- func NewServerRequestSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerRequestSize, error)
- func (ServerRequestSize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerRequestSize) AttrMethod(val string) attribute.KeyValue
- func (ServerRequestSize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerRequestSize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerRequestSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ServerRequestSize) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ServerRequestSize) AttrServerAddress(val string) attribute.KeyValue
- func (ServerRequestSize) AttrServerPort(val int) attribute.KeyValue
- func (ServerRequestSize) Description() string
- func (m ServerRequestSize) Inst() metric.Int64Histogram
- func (ServerRequestSize) Name() string
- func (m ServerRequestSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
- func (m ServerRequestSize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ServerRequestSize) Unit() string
- type ServerResponseSize
- func NewServerResponseSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerResponseSize, error)
- func (ServerResponseSize) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerResponseSize) AttrMethod(val string) attribute.KeyValue
- func (ServerResponseSize) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerResponseSize) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerResponseSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ServerResponseSize) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ServerResponseSize) AttrServerAddress(val string) attribute.KeyValue
- func (ServerResponseSize) AttrServerPort(val int) attribute.KeyValue
- func (ServerResponseSize) Description() string
- func (m ServerResponseSize) Inst() metric.Int64Histogram
- func (ServerResponseSize) Name() string
- func (m ServerResponseSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
- func (m ServerResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ServerResponseSize) Unit() string
- type SystemNameAttr
Types ¶
type ClientCallDuration ¶
type ClientCallDuration struct {
metric.Float64Histogram
}
ClientCallDuration is an instrument used to record metric values conforming to the "rpc.client.call.duration" semantic conventions. It represents the measures the duration of outbound remote procedure calls (RPC).
func NewClientCallDuration ¶
func NewClientCallDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientCallDuration, error)
NewClientCallDuration returns a new ClientCallDuration instrument.
func (ClientCallDuration) AttrErrorType ¶
func (ClientCallDuration) 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 (ClientCallDuration) AttrMethod ¶
func (ClientCallDuration) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the fully-qualified logical name of the method from the RPC interface perspective.
func (ClientCallDuration) AttrNetworkProtocolName ¶
func (ClientCallDuration) 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 (ClientCallDuration) AttrNetworkProtocolVersion ¶
func (ClientCallDuration) 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 (ClientCallDuration) AttrNetworkTransport ¶
func (ClientCallDuration) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.
func (ClientCallDuration) AttrResponseStatusCode ¶
func (ClientCallDuration) AttrResponseStatusCode(val string) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "rpc.response.status_code" semantic convention. It represents the status code of the RPC returned by the RPC server or generated by the client.
func (ClientCallDuration) AttrServerAddress ¶
func (ClientCallDuration) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the RPC server host name.
func (ClientCallDuration) AttrServerPort ¶
func (ClientCallDuration) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ClientCallDuration) Description ¶
func (ClientCallDuration) Description() string
Description returns the semantic convention description of the instrument
func (ClientCallDuration) Inst ¶
func (m ClientCallDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientCallDuration) Name ¶
func (ClientCallDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ClientCallDuration) Record ¶
func (m ClientCallDuration) Record( ctx context.Context, val float64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The systemName is the the Remote Procedure Call (RPC) system.
All additional attrs passed are included in the recorded value.
When this metric is reported alongside an RPC client span, the metric value SHOULD be the same as the RPC client span duration.
func (ClientCallDuration) RecordSet ¶
RecordSet records val to the current distribution for set.
When this metric is reported alongside an RPC client span, the metric value SHOULD be the same as the RPC client span duration.
func (ClientCallDuration) Unit ¶
func (ClientCallDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientRequestSize ¶
type ClientRequestSize struct {
metric.Int64Histogram
}
ClientRequestSize is an instrument used to record metric values conforming to the "rpc.client.request.size" semantic conventions. It represents the measures the size of RPC request messages (uncompressed).
func NewClientRequestSize ¶
func NewClientRequestSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientRequestSize, error)
NewClientRequestSize returns a new ClientRequestSize instrument.
func (ClientRequestSize) AttrErrorType ¶
func (ClientRequestSize) 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 (ClientRequestSize) AttrMethod ¶
func (ClientRequestSize) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the fully-qualified logical name of the method from the RPC interface perspective.
func (ClientRequestSize) AttrNetworkProtocolName ¶
func (ClientRequestSize) 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 (ClientRequestSize) AttrNetworkProtocolVersion ¶
func (ClientRequestSize) 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 (ClientRequestSize) AttrNetworkTransport ¶
func (ClientRequestSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.
func (ClientRequestSize) AttrResponseStatusCode ¶
func (ClientRequestSize) AttrResponseStatusCode(val string) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "rpc.response.status_code" semantic convention. It represents the status code of the RPC returned by the RPC server or generated by the client.
func (ClientRequestSize) AttrServerAddress ¶
func (ClientRequestSize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the RPC server host name.
func (ClientRequestSize) AttrServerPort ¶
func (ClientRequestSize) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ClientRequestSize) Description ¶
func (ClientRequestSize) Description() string
Description returns the semantic convention description of the instrument
func (ClientRequestSize) Inst ¶
func (m ClientRequestSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ClientRequestSize) Name ¶
func (ClientRequestSize) Name() string
Name returns the semantic convention name of the instrument.
func (ClientRequestSize) Record ¶
func (m ClientRequestSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The systemName is the the Remote Procedure Call (RPC) system.
All additional attrs passed are included in the recorded value.
**Streaming**: Recorded per message in a streaming batch
func (ClientRequestSize) RecordSet ¶
RecordSet records val to the current distribution for set.
**Streaming**: Recorded per message in a streaming batch
func (ClientRequestSize) Unit ¶
func (ClientRequestSize) Unit() string
Unit returns the semantic convention unit of the instrument
type ClientResponseSize ¶
type ClientResponseSize struct {
metric.Int64Histogram
}
ClientResponseSize is an instrument used to record metric values conforming to the "rpc.client.response.size" semantic conventions. It represents the measures the size of RPC response messages (uncompressed).
func NewClientResponseSize ¶
func NewClientResponseSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientResponseSize, error)
NewClientResponseSize returns a new ClientResponseSize instrument.
func (ClientResponseSize) AttrErrorType ¶
func (ClientResponseSize) 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 (ClientResponseSize) AttrMethod ¶
func (ClientResponseSize) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the fully-qualified logical name of the method from the RPC interface perspective.
func (ClientResponseSize) AttrNetworkProtocolName ¶
func (ClientResponseSize) 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 (ClientResponseSize) AttrNetworkProtocolVersion ¶
func (ClientResponseSize) 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 (ClientResponseSize) AttrNetworkTransport ¶
func (ClientResponseSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.
func (ClientResponseSize) AttrResponseStatusCode ¶
func (ClientResponseSize) AttrResponseStatusCode(val string) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "rpc.response.status_code" semantic convention. It represents the status code of the RPC returned by the RPC server or generated by the client.
func (ClientResponseSize) AttrServerAddress ¶
func (ClientResponseSize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the RPC server host name.
func (ClientResponseSize) AttrServerPort ¶
func (ClientResponseSize) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ClientResponseSize) Description ¶
func (ClientResponseSize) Description() string
Description returns the semantic convention description of the instrument
func (ClientResponseSize) Inst ¶
func (m ClientResponseSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ClientResponseSize) Name ¶
func (ClientResponseSize) Name() string
Name returns the semantic convention name of the instrument.
func (ClientResponseSize) Record ¶
func (m ClientResponseSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The systemName is the the Remote Procedure Call (RPC) system.
All additional attrs passed are included in the recorded value.
**Streaming**: Recorded per response in a streaming batch
func (ClientResponseSize) RecordSet ¶
RecordSet records val to the current distribution for set.
**Streaming**: Recorded per response in a streaming batch
func (ClientResponseSize) Unit ¶
func (ClientResponseSize) Unit() string
Unit returns the semantic convention unit of the instrument
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 NetworkTransportAttr ¶
type NetworkTransportAttr string
NetworkTransportAttr is an attribute conforming to the network.transport semantic conventions. It represents the OSI transport layer or inter-process communication method.
var ( // NetworkTransportTCP is the TCP. NetworkTransportTCP NetworkTransportAttr = "tcp" // NetworkTransportUDP is the UDP. NetworkTransportUDP NetworkTransportAttr = "udp" // NetworkTransportPipe is the named or anonymous pipe. NetworkTransportPipe NetworkTransportAttr = "pipe" // NetworkTransportUnix is the unix domain socket. NetworkTransportUnix NetworkTransportAttr = "unix" // NetworkTransportQUIC is the QUIC. NetworkTransportQUIC NetworkTransportAttr = "quic" )
type ServerCallDuration ¶
type ServerCallDuration struct {
metric.Float64Histogram
}
ServerCallDuration is an instrument used to record metric values conforming to the "rpc.server.call.duration" semantic conventions. It represents the measures the duration of inbound remote procedure calls (RPC).
func NewServerCallDuration ¶
func NewServerCallDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ServerCallDuration, error)
NewServerCallDuration returns a new ServerCallDuration instrument.
func (ServerCallDuration) AttrErrorType ¶
func (ServerCallDuration) 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 (ServerCallDuration) AttrMethod ¶
func (ServerCallDuration) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the fully-qualified logical name of the method from the RPC interface perspective.
func (ServerCallDuration) AttrNetworkProtocolName ¶
func (ServerCallDuration) 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 (ServerCallDuration) AttrNetworkProtocolVersion ¶
func (ServerCallDuration) 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 (ServerCallDuration) AttrNetworkTransport ¶
func (ServerCallDuration) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.
func (ServerCallDuration) AttrResponseStatusCode ¶
func (ServerCallDuration) AttrResponseStatusCode(val string) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "rpc.response.status_code" semantic convention. It represents the status code of the RPC returned by the RPC server or generated by the client.
func (ServerCallDuration) AttrServerAddress ¶
func (ServerCallDuration) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the RPC server host name.
func (ServerCallDuration) AttrServerPort ¶
func (ServerCallDuration) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ServerCallDuration) Description ¶
func (ServerCallDuration) Description() string
Description returns the semantic convention description of the instrument
func (ServerCallDuration) Inst ¶
func (m ServerCallDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ServerCallDuration) Name ¶
func (ServerCallDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ServerCallDuration) Record ¶
func (m ServerCallDuration) Record( ctx context.Context, val float64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The systemName is the the Remote Procedure Call (RPC) system.
All additional attrs passed are included in the recorded value.
When this metric is reported alongside an RPC server span, the metric value SHOULD be the same as the RPC server span duration.
func (ServerCallDuration) RecordSet ¶
RecordSet records val to the current distribution for set.
When this metric is reported alongside an RPC server span, the metric value SHOULD be the same as the RPC server span duration.
func (ServerCallDuration) Unit ¶
func (ServerCallDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type ServerRequestSize ¶
type ServerRequestSize struct {
metric.Int64Histogram
}
ServerRequestSize is an instrument used to record metric values conforming to the "rpc.server.request.size" semantic conventions. It represents the measures the size of RPC request messages (uncompressed).
func NewServerRequestSize ¶
func NewServerRequestSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerRequestSize, error)
NewServerRequestSize returns a new ServerRequestSize instrument.
func (ServerRequestSize) AttrErrorType ¶
func (ServerRequestSize) 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 (ServerRequestSize) AttrMethod ¶
func (ServerRequestSize) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the fully-qualified logical name of the method from the RPC interface perspective.
func (ServerRequestSize) AttrNetworkProtocolName ¶
func (ServerRequestSize) 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 (ServerRequestSize) AttrNetworkProtocolVersion ¶
func (ServerRequestSize) 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 (ServerRequestSize) AttrNetworkTransport ¶
func (ServerRequestSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.
func (ServerRequestSize) AttrResponseStatusCode ¶
func (ServerRequestSize) AttrResponseStatusCode(val string) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "rpc.response.status_code" semantic convention. It represents the status code of the RPC returned by the RPC server or generated by the client.
func (ServerRequestSize) AttrServerAddress ¶
func (ServerRequestSize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the RPC server host name.
func (ServerRequestSize) AttrServerPort ¶
func (ServerRequestSize) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ServerRequestSize) Description ¶
func (ServerRequestSize) Description() string
Description returns the semantic convention description of the instrument
func (ServerRequestSize) Inst ¶
func (m ServerRequestSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ServerRequestSize) Name ¶
func (ServerRequestSize) Name() string
Name returns the semantic convention name of the instrument.
func (ServerRequestSize) Record ¶
func (m ServerRequestSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The systemName is the the Remote Procedure Call (RPC) system.
All additional attrs passed are included in the recorded value.
**Streaming**: Recorded per message in a streaming batch
func (ServerRequestSize) RecordSet ¶
RecordSet records val to the current distribution for set.
**Streaming**: Recorded per message in a streaming batch
func (ServerRequestSize) Unit ¶
func (ServerRequestSize) Unit() string
Unit returns the semantic convention unit of the instrument
type ServerResponseSize ¶
type ServerResponseSize struct {
metric.Int64Histogram
}
ServerResponseSize is an instrument used to record metric values conforming to the "rpc.server.response.size" semantic conventions. It represents the measures the size of RPC response messages (uncompressed).
func NewServerResponseSize ¶
func NewServerResponseSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerResponseSize, error)
NewServerResponseSize returns a new ServerResponseSize instrument.
func (ServerResponseSize) AttrErrorType ¶
func (ServerResponseSize) 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 (ServerResponseSize) AttrMethod ¶
func (ServerResponseSize) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the fully-qualified logical name of the method from the RPC interface perspective.
func (ServerResponseSize) AttrNetworkProtocolName ¶
func (ServerResponseSize) 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 (ServerResponseSize) AttrNetworkProtocolVersion ¶
func (ServerResponseSize) 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 (ServerResponseSize) AttrNetworkTransport ¶
func (ServerResponseSize) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
AttrNetworkTransport returns an optional attribute for the "network.transport" semantic convention. It represents the OSI transport layer or inter-process communication method.
func (ServerResponseSize) AttrResponseStatusCode ¶
func (ServerResponseSize) AttrResponseStatusCode(val string) attribute.KeyValue
AttrResponseStatusCode returns an optional attribute for the "rpc.response.status_code" semantic convention. It represents the status code of the RPC returned by the RPC server or generated by the client.
func (ServerResponseSize) AttrServerAddress ¶
func (ServerResponseSize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the RPC server host name.
func (ServerResponseSize) AttrServerPort ¶
func (ServerResponseSize) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ServerResponseSize) Description ¶
func (ServerResponseSize) Description() string
Description returns the semantic convention description of the instrument
func (ServerResponseSize) Inst ¶
func (m ServerResponseSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ServerResponseSize) Name ¶
func (ServerResponseSize) Name() string
Name returns the semantic convention name of the instrument.
func (ServerResponseSize) Record ¶
func (m ServerResponseSize) Record( ctx context.Context, val int64, systemName SystemNameAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The systemName is the the Remote Procedure Call (RPC) system.
All additional attrs passed are included in the recorded value.
**Streaming**: Recorded per response in a streaming batch
func (ServerResponseSize) RecordSet ¶
RecordSet records val to the current distribution for set.
**Streaming**: Recorded per response in a streaming batch
func (ServerResponseSize) Unit ¶
func (ServerResponseSize) Unit() string
Unit returns the semantic convention unit of the instrument
type SystemNameAttr ¶
type SystemNameAttr string
SystemNameAttr is an attribute conforming to the rpc.system.name semantic conventions. It represents the Remote Procedure Call (RPC) system.
var ( // SystemNameGRPC is the [gRPC]. // // [gRPC]: https://grpc.io/ SystemNameGRPC SystemNameAttr = "grpc" // SystemNameDubbo is the [Apache Dubbo]. // // [Apache Dubbo]: https://dubbo.apache.org/ SystemNameDubbo SystemNameAttr = "dubbo" // SystemNameConnectrpc is the [Connect RPC]. // // [Connect RPC]: https://connectrpc.com/ SystemNameConnectrpc SystemNameAttr = "connectrpc" // SystemNameJSONRPC is the [JSON-RPC]. // // [JSON-RPC]: https://www.jsonrpc.org/ SystemNameJSONRPC SystemNameAttr = "jsonrpc" )
Source Files ¶
metric.go
- Version
- v1.43.0 (latest)
- Published
- Apr 3, 2026
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 18 minutes ago –
Tools for package owners.