Documentation ¶
Overview ¶
Package telemetry provides server's telemetry powered by Open Telemetry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITelemetry ¶
type ITelemetry interface { // GetGlobalTracer returns the global tracer. GetGlobalTracer() trace.Tracer // GetTracer retrieves a tracer. If the retrieved tracer doesn't exist, the // global tracer is returned. GetTracer(name string) trace.Tracer // NewTracer creates a tracer from the current provider. NewTracer(name string) trace.Tracer }
ITelemetry defines what a Telemetry does.
type Telemetry ¶
type Telemetry struct { // Provider accesses/consumes instrumentation. // // SEE: https://opentelemetry.io/docs/instrumentation/go/exporting_data/ Provider trace.TracerProvider // TextMapPropagator propagates cross-cutting concerns as key-value text. // // SEE: // SEE: https://opentelemetry.io/docs/instrumentation/go/manual/#propagators-and-context TextMapPropagator []propagation.TextMapPropagator // contains filtered or unexported fields }
Telemetry definition.
func New ¶
func New( name string, provider trace.TracerProvider, textMapPropagators ...propagation.TextMapPropagator, ) (*Telemetry, error)
New is Telemetry factory.
func NewDefault ¶
NewDefault returns a telemetry with the default tracer, the built-in from the SDK which exports to `stdout`, and samples every trace.
func (*Telemetry) GetGlobalTracer ¶
GetGlobalTracer returns the global tracer.
Click to show internal directories.
Click to hide internal directories.