Documentation
¶
Overview ¶
Package telemetry contains code that emits telemetry (logging, metrics, tracing).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithRPCInfo ¶
ContextWithRPCInfo will save the rpc method and service information in context.
func MustNewTracerProvider ¶
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 ¶
func RPCInfoFromContext ¶
RPCInfoFromContext returns method and service stored in context.
type TracerOption ¶
type TracerOption func(d *customTracer)
func WithAttributes ¶
func WithAttributes(attrs ...attribute.KeyValue) TracerOption
func WithOTLPEndpoint ¶
func WithOTLPEndpoint(endpoint string) TracerOption
func WithOTLPInsecure ¶
func WithOTLPInsecure() TracerOption
func WithSamplingRatio ¶
func WithSamplingRatio(samplingRatio float64) TracerOption
Click to show internal directories.
Click to hide internal directories.