Documentation
¶
Index ¶
- func InitRpcMetrics(m metric.Meter)
- type ClientRpcAttrsExtractor
- func (s *ClientRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
- func (s *ClientRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnEnd(attributes []attribute.KeyValue, context context.Context, request REQUEST, ...) ([]attribute.KeyValue, context.Context)
- func (s *ClientRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) ([]attribute.KeyValue, context.Context)
- type RpcAttrsExtractor
- func (r *RpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnEnd(attributes []attribute.KeyValue, context context.Context, request REQUEST, ...) ([]attribute.KeyValue, context.Context)
- func (r *RpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) ([]attribute.KeyValue, context.Context)
- type RpcAttrsGetter
- type RpcClientMetric
- func (h *RpcClientMetric) OnAfterEnd(context context.Context, endAttributes []attribute.KeyValue, endTime time.Time)
- func (h *RpcClientMetric) OnAfterStart(context context.Context, endTime time.Time)
- func (h *RpcClientMetric) OnBeforeEnd(ctx context.Context, startAttributes []attribute.KeyValue, startTime time.Time) context.Context
- func (h *RpcClientMetric) OnBeforeStart(parentContext context.Context, startTime time.Time) context.Context
- type RpcServerMetric
- func (h *RpcServerMetric) OnAfterEnd(context context.Context, endAttributes []attribute.KeyValue, endTime time.Time)
- func (h *RpcServerMetric) OnAfterStart(context context.Context, endTime time.Time)
- func (h *RpcServerMetric) OnBeforeEnd(ctx context.Context, startAttributes []attribute.KeyValue, startTime time.Time) context.Context
- func (h *RpcServerMetric) OnBeforeStart(parentContext context.Context, startTime time.Time) context.Context
- type RpcSpanNameExtractor
- type ServerRpcAttrsExtractor
- func (s *ServerRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
- func (s *ServerRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnEnd(attributes []attribute.KeyValue, context context.Context, request REQUEST, ...) ([]attribute.KeyValue, context.Context)
- func (s *ServerRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) OnStart(attributes []attribute.KeyValue, parentContext context.Context, ...) ([]attribute.KeyValue, context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRpcMetrics ¶ added in v0.7.0
InitRpcMetrics so we need to make sure the otel_setup is executed before all the init() function related to issue rpcs://github.com/alibaba/opentelemetry-go-auto-instrumentation/issues/48
Types ¶
type ClientRpcAttrsExtractor ¶
type ClientRpcAttrsExtractor[REQUEST any, RESPONSE any, GETTER RpcAttrsGetter[REQUEST]] struct { Base RpcAttrsExtractor[REQUEST, RESPONSE, GETTER] }
func (*ClientRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey ¶
func (s *ClientRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
type RpcAttrsExtractor ¶
type RpcAttrsExtractor[REQUEST any, RESPONSE any, GETTER RpcAttrsGetter[REQUEST]] struct { Getter GETTER }
type RpcAttrsGetter ¶
type RpcClientMetric ¶ added in v0.7.0
type RpcClientMetric struct {
// contains filtered or unexported fields
}
func RpcClientMetrics ¶ added in v0.7.0
func RpcClientMetrics(key string) *RpcClientMetric
func (*RpcClientMetric) OnAfterEnd ¶ added in v0.7.0
func (*RpcClientMetric) OnAfterStart ¶ added in v0.7.0
func (h *RpcClientMetric) OnAfterStart(context context.Context, endTime time.Time)
func (*RpcClientMetric) OnBeforeEnd ¶ added in v0.7.0
func (*RpcClientMetric) OnBeforeStart ¶ added in v0.7.0
type RpcServerMetric ¶ added in v0.7.0
type RpcServerMetric struct {
// contains filtered or unexported fields
}
func RpcServerMetrics ¶ added in v0.7.0
func RpcServerMetrics(key string) *RpcServerMetric
func (*RpcServerMetric) OnAfterEnd ¶ added in v0.7.0
func (*RpcServerMetric) OnAfterStart ¶ added in v0.7.0
func (h *RpcServerMetric) OnAfterStart(context context.Context, endTime time.Time)
func (*RpcServerMetric) OnBeforeEnd ¶ added in v0.7.0
func (*RpcServerMetric) OnBeforeStart ¶ added in v0.7.0
type RpcSpanNameExtractor ¶
type RpcSpanNameExtractor[REQUEST any] struct { Getter RpcAttrsGetter[REQUEST] }
func (*RpcSpanNameExtractor[REQUEST]) Extract ¶
func (r *RpcSpanNameExtractor[REQUEST]) Extract(request REQUEST) string
type ServerRpcAttrsExtractor ¶
type ServerRpcAttrsExtractor[REQUEST any, RESPONSE any, GETTER RpcAttrsGetter[REQUEST]] struct { Base RpcAttrsExtractor[REQUEST, RESPONSE, GETTER] }
func (*ServerRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey ¶
func (s *ServerRpcAttrsExtractor[REQUEST, RESPONSE, GETTER]) GetSpanKey() attribute.Key
Click to show internal directories.
Click to hide internal directories.