Documentation
¶
Overview ¶
Package telemetry contains code that emits telemetry (logging, metrics, tracing).
Index ¶
- Constants
- func ContextWithDispatchThrottlingThreshold(ctx context.Context, threshold uint32) context.Context
- func ContextWithRPCInfo(ctx context.Context, rpcInfo RPCInfo) context.Context
- func DispatchThrottlingThresholdFromContext(ctx context.Context) uint32
- func MustNewTracerProvider(opts ...TracerOption) *sdktrace.TracerProvider
- func TraceError(span trace.Span, err error)
- type RPCInfo
- type TracerOption
Constants ¶
View Source
const (
Throttled string = "Throttled"
)
Variables ¶
This section is empty.
Functions ¶
func ContextWithDispatchThrottlingThreshold ¶
ContextWithDispatchThrottlingThreshold will save the dispatch throttling threshold in context.
func ContextWithRPCInfo ¶ added in v1.3.2
ContextWithRPCInfo will save the rpc method and service information in context.
func DispatchThrottlingThresholdFromContext ¶
DispatchThrottlingThresholdFromContext returns the dispatch throttling threshold saved in context Return 0 if not found.
func MustNewTracerProvider ¶ added in v0.3.4
func MustNewTracerProvider(opts ...TracerOption) *sdktrace.TracerProvider
func TraceError ¶
TraceError marks the span as having an error, except if the error is context.Canceled, in which case it does nothing.
Types ¶
type RPCInfo ¶ added in v1.3.2
func RPCInfoFromContext ¶ added in v1.3.2
RPCInfoFromContext returns method and service stored in context.
type TracerOption ¶ added in v1.3.0
type TracerOption func(d *customTracer)
func WithAttributes ¶ added in v1.3.0
func WithAttributes(attrs ...attribute.KeyValue) TracerOption
func WithOTLPEndpoint ¶ added in v1.3.0
func WithOTLPEndpoint(endpoint string) TracerOption
func WithOTLPInsecure ¶ added in v1.3.2
func WithOTLPInsecure() TracerOption
func WithSamplingRatio ¶ added in v1.3.0
func WithSamplingRatio(samplingRatio float64) TracerOption
Click to show internal directories.
Click to hide internal directories.