rpcconv
v1.47.0
Documentation
pkg.go.dev ↗Package rpcconv provides types and functionality for OpenTelemetry semantic conventions in the "rpc" namespace.
Types
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.
NewClientDuration
func NewClientDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ClientDuration, error)
NewClientDuration returns a new ClientDuration instrument.
ClientDuration.Description
func (ClientDuration) Description() string
Description returns the semantic convention description of the instrument
ClientDuration.Inst
func (m ClientDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
ClientDuration.Name
func (ClientDuration) Name() string
Name returns the semantic convention name of the instrument.
ClientDuration.Record
func (m ClientDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
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.
ClientDuration.Unit
func (ClientDuration) Unit() string
Unit returns the semantic convention unit of the instrument
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).
NewClientRequestSize
func NewClientRequestSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientRequestSize, error)
NewClientRequestSize returns a new ClientRequestSize instrument.
ClientRequestSize.Description
func (ClientRequestSize) Description() string
Description returns the semantic convention description of the instrument
ClientRequestSize.Inst
func (m ClientRequestSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ClientRequestSize.Name
func (ClientRequestSize) Name() string
Name returns the semantic convention name of the instrument.
ClientRequestSize.Record
func (m ClientRequestSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
**Streaming**: Recorded per message in a streaming batch
ClientRequestSize.Unit
func (ClientRequestSize) Unit() string
Unit returns the semantic convention unit of the instrument
ClientRequestsPerRPC
type ClientRequestsPerRPC struct {
metric.Int64Histogram
}
ClientRequestsPerRPC is an instrument used to record metric values conforming to the "rpc.client.requests_per_rpc" semantic conventions. It represents the measures the number of messages received per RPC.
NewClientRequestsPerRPC
func NewClientRequestsPerRPC( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientRequestsPerRPC, error)
NewClientRequestsPerRPC returns a new ClientRequestsPerRPC instrument.
ClientRequestsPerRPC.Description
func (ClientRequestsPerRPC) Description() string
Description returns the semantic convention description of the instrument
ClientRequestsPerRPC.Inst
func (m ClientRequestsPerRPC) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ClientRequestsPerRPC.Name
func (ClientRequestsPerRPC) Name() string
Name returns the semantic convention name of the instrument.
ClientRequestsPerRPC.Record
func (m ClientRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
Should be 1 for all non-streaming RPCs.
**Streaming**: This metric is required for server and client streaming RPCs
ClientRequestsPerRPC.Unit
func (ClientRequestsPerRPC) Unit() string
Unit returns the semantic convention unit of the instrument
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).
NewClientResponseSize
func NewClientResponseSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientResponseSize, error)
NewClientResponseSize returns a new ClientResponseSize instrument.
ClientResponseSize.Description
func (ClientResponseSize) Description() string
Description returns the semantic convention description of the instrument
ClientResponseSize.Inst
func (m ClientResponseSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ClientResponseSize.Name
func (ClientResponseSize) Name() string
Name returns the semantic convention name of the instrument.
ClientResponseSize.Record
func (m ClientResponseSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
**Streaming**: Recorded per response in a streaming batch
ClientResponseSize.Unit
func (ClientResponseSize) Unit() string
Unit returns the semantic convention unit of the instrument
ClientResponsesPerRPC
type ClientResponsesPerRPC struct {
metric.Int64Histogram
}
ClientResponsesPerRPC is an instrument used to record metric values conforming to the "rpc.client.responses_per_rpc" semantic conventions. It represents the measures the number of messages sent per RPC.
NewClientResponsesPerRPC
func NewClientResponsesPerRPC( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ClientResponsesPerRPC, error)
NewClientResponsesPerRPC returns a new ClientResponsesPerRPC instrument.
ClientResponsesPerRPC.Description
func (ClientResponsesPerRPC) Description() string
Description returns the semantic convention description of the instrument
ClientResponsesPerRPC.Inst
func (m ClientResponsesPerRPC) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ClientResponsesPerRPC.Name
func (ClientResponsesPerRPC) Name() string
Name returns the semantic convention name of the instrument.
ClientResponsesPerRPC.Record
func (m ClientResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
Should be 1 for all non-streaming RPCs.
**Streaming**: This metric is required for server and client streaming RPCs
ClientResponsesPerRPC.Unit
func (ClientResponsesPerRPC) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewServerDuration
func NewServerDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (ServerDuration, error)
NewServerDuration returns a new ServerDuration instrument.
ServerDuration.Description
func (ServerDuration) Description() string
Description returns the semantic convention description of the instrument
ServerDuration.Inst
func (m ServerDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
ServerDuration.Name
func (ServerDuration) Name() string
Name returns the semantic convention name of the instrument.
ServerDuration.Record
func (m ServerDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
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.
ServerDuration.Unit
func (ServerDuration) Unit() string
Unit returns the semantic convention unit of the instrument
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).
NewServerRequestSize
func NewServerRequestSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerRequestSize, error)
NewServerRequestSize returns a new ServerRequestSize instrument.
ServerRequestSize.Description
func (ServerRequestSize) Description() string
Description returns the semantic convention description of the instrument
ServerRequestSize.Inst
func (m ServerRequestSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ServerRequestSize.Name
func (ServerRequestSize) Name() string
Name returns the semantic convention name of the instrument.
ServerRequestSize.Record
func (m ServerRequestSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
**Streaming**: Recorded per message in a streaming batch
ServerRequestSize.Unit
func (ServerRequestSize) Unit() string
Unit returns the semantic convention unit of the instrument
ServerRequestsPerRPC
type ServerRequestsPerRPC struct {
metric.Int64Histogram
}
ServerRequestsPerRPC is an instrument used to record metric values conforming to the "rpc.server.requests_per_rpc" semantic conventions. It represents the measures the number of messages received per RPC.
NewServerRequestsPerRPC
func NewServerRequestsPerRPC( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerRequestsPerRPC, error)
NewServerRequestsPerRPC returns a new ServerRequestsPerRPC instrument.
ServerRequestsPerRPC.Description
func (ServerRequestsPerRPC) Description() string
Description returns the semantic convention description of the instrument
ServerRequestsPerRPC.Inst
func (m ServerRequestsPerRPC) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ServerRequestsPerRPC.Name
func (ServerRequestsPerRPC) Name() string
Name returns the semantic convention name of the instrument.
ServerRequestsPerRPC.Record
func (m ServerRequestsPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
Should be 1 for all non-streaming RPCs.
**Streaming** : This metric is required for server and client streaming RPCs
ServerRequestsPerRPC.Unit
func (ServerRequestsPerRPC) Unit() string
Unit returns the semantic convention unit of the instrument
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).
NewServerResponseSize
func NewServerResponseSize( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerResponseSize, error)
NewServerResponseSize returns a new ServerResponseSize instrument.
ServerResponseSize.Description
func (ServerResponseSize) Description() string
Description returns the semantic convention description of the instrument
ServerResponseSize.Inst
func (m ServerResponseSize) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ServerResponseSize.Name
func (ServerResponseSize) Name() string
Name returns the semantic convention name of the instrument.
ServerResponseSize.Record
func (m ServerResponseSize) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
**Streaming**: Recorded per response in a streaming batch
ServerResponseSize.Unit
func (ServerResponseSize) Unit() string
Unit returns the semantic convention unit of the instrument
ServerResponsesPerRPC
type ServerResponsesPerRPC struct {
metric.Int64Histogram
}
ServerResponsesPerRPC is an instrument used to record metric values conforming to the "rpc.server.responses_per_rpc" semantic conventions. It represents the measures the number of messages sent per RPC.
NewServerResponsesPerRPC
func NewServerResponsesPerRPC( m metric.Meter, opt ...metric.Int64HistogramOption, ) (ServerResponsesPerRPC, error)
NewServerResponsesPerRPC returns a new ServerResponsesPerRPC instrument.
ServerResponsesPerRPC.Description
func (ServerResponsesPerRPC) Description() string
Description returns the semantic convention description of the instrument
ServerResponsesPerRPC.Inst
func (m ServerResponsesPerRPC) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
ServerResponsesPerRPC.Name
func (ServerResponsesPerRPC) Name() string
Name returns the semantic convention name of the instrument.
ServerResponsesPerRPC.Record
func (m ServerResponsesPerRPC) Record(ctx context.Context, val int64, attrs ...attribute.KeyValue)
Record records val to the current distribution.
Should be 1 for all non-streaming RPCs.
**Streaming**: This metric is required for server and client streaming RPCs
ServerResponsesPerRPC.Unit
func (ServerResponsesPerRPC) Unit() string
Unit returns the semantic convention unit of the instrument