package rpcconv
import "go.opentelemetry.io/otel/semconv/v1.38.0/rpcconv"
Package rpcconv provides types and functionality for OpenTelemetry semantic conventions in the "rpc" namespace.
Index ¶
- type ClientDuration
- func NewClientDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientDuration, error)
- func (ClientDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientDuration) AttrMethod(val string) attribute.KeyValue
- func (ClientDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ClientDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ClientDuration) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ClientDuration) AttrServerPort(val int) attribute.KeyValue
- func (ClientDuration) AttrService(val string) attribute.KeyValue
- func (ClientDuration) Description() string
- func (m ClientDuration) Inst() metric.Float64Histogram
- func (ClientDuration) Name() string
- func (m ClientDuration) Record( ctx context.Context, val float64, system SystemAttr, serverAddress string, attrs ...attribute.KeyValue, )
- func (m ClientDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientDuration) 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) AttrServerPort(val int) attribute.KeyValue
- func (ClientRequestSize) AttrService(val string) 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, system SystemAttr, serverAddress string, 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) AttrServerPort(val int) attribute.KeyValue
- func (ClientResponseSize) AttrService(val string) 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, system SystemAttr, serverAddress string, attrs ...attribute.KeyValue, )
- func (m ClientResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ClientResponseSize) Unit() string
- type ErrorTypeAttr
- type NetworkTransportAttr
- type ServerDuration
- func NewServerDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ServerDuration, error)
- func (ServerDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ServerDuration) AttrMethod(val string) attribute.KeyValue
- func (ServerDuration) AttrNetworkProtocolName(val string) attribute.KeyValue
- func (ServerDuration) AttrNetworkProtocolVersion(val string) attribute.KeyValue
- func (ServerDuration) AttrNetworkTransport(val NetworkTransportAttr) attribute.KeyValue
- func (ServerDuration) AttrServerAddress(val string) attribute.KeyValue
- func (ServerDuration) AttrServerPort(val int) attribute.KeyValue
- func (ServerDuration) AttrService(val string) attribute.KeyValue
- func (ServerDuration) Description() string
- func (m ServerDuration) Inst() metric.Float64Histogram
- func (ServerDuration) Name() string
- func (m ServerDuration) Record( ctx context.Context, val float64, system SystemAttr, attrs ...attribute.KeyValue, )
- func (m ServerDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ServerDuration) 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) AttrServerAddress(val string) attribute.KeyValue
- func (ServerRequestSize) AttrServerPort(val int) attribute.KeyValue
- func (ServerRequestSize) AttrService(val string) 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, system SystemAttr, 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) AttrServerAddress(val string) attribute.KeyValue
- func (ServerResponseSize) AttrServerPort(val int) attribute.KeyValue
- func (ServerResponseSize) AttrService(val string) 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, system SystemAttr, attrs ...attribute.KeyValue, )
- func (m ServerResponseSize) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ServerResponseSize) Unit() string
- type SystemAttr
Types ¶
type ClientDuration ¶
type ClientDuration struct {
metric.Float64Histogram
}
ClientDuration is an instrument used to record metric values conforming to the "rpc.client.duration" semantic conventions. It represents the measures the duration of outbound RPC.
func NewClientDuration ¶
func NewClientDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientDuration, error)
NewClientDuration returns a new ClientDuration instrument.
func (ClientDuration) AttrErrorType ¶
func (ClientDuration) 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 (ClientDuration) AttrMethod ¶
func (ClientDuration) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the this is the logical name of the method from the RPC interface perspective.
func (ClientDuration) AttrNetworkProtocolName ¶
func (ClientDuration) 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 (ClientDuration) AttrNetworkProtocolVersion ¶
func (ClientDuration) 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 (ClientDuration) AttrNetworkTransport ¶
func (ClientDuration) 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 (ClientDuration) AttrServerPort ¶
func (ClientDuration) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ClientDuration) AttrService ¶
func (ClientDuration) AttrService(val string) attribute.KeyValue
AttrService returns an optional attribute for the "rpc.service" semantic convention. It represents the full (logical) name of the service being called, including its package name, if applicable.
func (ClientDuration) Description ¶
func (ClientDuration) Description() string
Description returns the semantic convention description of the instrument
func (ClientDuration) Inst ¶
func (m ClientDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientDuration) Name ¶
func (ClientDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ClientDuration) Record ¶
func (m ClientDuration) Record( ctx context.Context, val float64, system SystemAttr, serverAddress string, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The system is the a string identifying the remoting system. See below for a list of well-known identifiers.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
All additional attrs passed are included in the recorded value.
While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice.
**Streaming**: N/A.
func (ClientDuration) RecordSet ¶
RecordSet records val to the current distribution for set.
While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice.
**Streaming**: N/A.
func (ClientDuration) Unit ¶
func (ClientDuration) 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 this is the 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) 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) AttrService ¶
func (ClientRequestSize) AttrService(val string) attribute.KeyValue
AttrService returns an optional attribute for the "rpc.service" semantic convention. It represents the full (logical) name of the service being called, including its package name, if applicable.
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, system SystemAttr, serverAddress string, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The system is the a string identifying the remoting system. See below for a list of well-known identifiers.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
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 this is the 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) 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) AttrService ¶
func (ClientResponseSize) AttrService(val string) attribute.KeyValue
AttrService returns an optional attribute for the "rpc.service" semantic convention. It represents the full (logical) name of the service being called, including its package name, if applicable.
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, system SystemAttr, serverAddress string, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The system is the a string identifying the remoting system. See below for a list of well-known identifiers.
The serverAddress is the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
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 ServerDuration ¶
type ServerDuration struct {
metric.Float64Histogram
}
ServerDuration is an instrument used to record metric values conforming to the "rpc.server.duration" semantic conventions. It represents the measures the duration of inbound RPC.
func NewServerDuration ¶
func NewServerDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ServerDuration, error)
NewServerDuration returns a new ServerDuration instrument.
func (ServerDuration) AttrErrorType ¶
func (ServerDuration) 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 (ServerDuration) AttrMethod ¶
func (ServerDuration) AttrMethod(val string) attribute.KeyValue
AttrMethod returns an optional attribute for the "rpc.method" semantic convention. It represents the this is the logical name of the method from the RPC interface perspective.
func (ServerDuration) AttrNetworkProtocolName ¶
func (ServerDuration) 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 (ServerDuration) AttrNetworkProtocolVersion ¶
func (ServerDuration) 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 (ServerDuration) AttrNetworkTransport ¶
func (ServerDuration) 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 (ServerDuration) AttrServerAddress ¶
func (ServerDuration) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
func (ServerDuration) AttrServerPort ¶
func (ServerDuration) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (ServerDuration) AttrService ¶
func (ServerDuration) AttrService(val string) attribute.KeyValue
AttrService returns an optional attribute for the "rpc.service" semantic convention. It represents the full (logical) name of the service being called, including its package name, if applicable.
func (ServerDuration) Description ¶
func (ServerDuration) Description() string
Description returns the semantic convention description of the instrument
func (ServerDuration) Inst ¶
func (m ServerDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ServerDuration) Name ¶
func (ServerDuration) Name() string
Name returns the semantic convention name of the instrument.
func (ServerDuration) Record ¶
func (m ServerDuration) Record( ctx context.Context, val float64, system SystemAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The system is the a string identifying the remoting system. See below for a list of well-known identifiers.
All additional attrs passed are included in the recorded value.
While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice.
**Streaming**: N/A.
func (ServerDuration) RecordSet ¶
RecordSet records val to the current distribution for set.
While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice.
**Streaming**: N/A.
func (ServerDuration) Unit ¶
func (ServerDuration) 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 this is the 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) AttrServerAddress ¶
func (ServerRequestSize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket 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) AttrService ¶
func (ServerRequestSize) AttrService(val string) attribute.KeyValue
AttrService returns an optional attribute for the "rpc.service" semantic convention. It represents the full (logical) name of the service being called, including its package name, if applicable.
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, system SystemAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The system is the a string identifying the remoting system. See below for a list of well-known identifiers.
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 this is the 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) AttrServerAddress ¶
func (ServerResponseSize) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket 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) AttrService ¶
func (ServerResponseSize) AttrService(val string) attribute.KeyValue
AttrService returns an optional attribute for the "rpc.service" semantic convention. It represents the full (logical) name of the service being called, including its package name, if applicable.
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, system SystemAttr, attrs ...attribute.KeyValue, )
Record records val to the current distribution for attrs.
The system is the a string identifying the remoting system. See below for a list of well-known identifiers.
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 SystemAttr ¶
type SystemAttr string
SystemAttr is an attribute conforming to the rpc.system semantic conventions. It represents a string identifying the remoting system. See below for a list of well-known identifiers.
var ( // SystemGRPC is the gRPC. SystemGRPC SystemAttr = "grpc" // SystemJavaRmi is the java RMI. SystemJavaRmi SystemAttr = "java_rmi" // SystemDotnetWcf is the NET WCF. SystemDotnetWcf SystemAttr = "dotnet_wcf" // SystemApacheDubbo is the apache Dubbo. SystemApacheDubbo SystemAttr = "apache_dubbo" // SystemConnectRPC is the connect RPC. SystemConnectRPC SystemAttr = "connect_rpc" // SystemOncRPC is the [ONC RPC (Sun RPC)]. // // [ONC RPC (Sun RPC)]: https://datatracker.ietf.org/doc/html/rfc5531 SystemOncRPC SystemAttr = "onc_rpc" // SystemJSONRPC is the JSON-RPC. SystemJSONRPC SystemAttr = "jsonrpc" )
Source Files ¶
metric.go
- Version
- v1.43.0 (latest)
- Published
- Apr 3, 2026
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 3 hours ago –
Tools for package owners.