Documentation ¶
Index ¶
- func ExtractSpan(ctx context.Context) (otelTrace.SpanContext, error)
- func FinishSpan(ctx context.Context, err error)
- func InitializeOtel() error
- func InjectSpan(ctx context.Context) (context.Context, error)
- func StartSpan(parentCtx context.Context, opName string, attributes ...attribute.KeyValue) (context.Context, trace.Span)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractSpan ¶
func ExtractSpan(ctx context.Context) (otelTrace.SpanContext, error)
ExtractSpan retrieves an OpenTelemetry span context from the given context.Context The span context can be received directly (inside the context) or via an RPC call (encoded in a carrier)
func FinishSpan ¶
FinishSpan finishes a span retrieved from the given context and logs the error if it exists
func InitializeOtel ¶
func InitializeOtel() error
func InjectSpan ¶
InjectSpan retrieves an OpenTelemetry span from the current context and creates a new context with it encoded in text map format inside the propagatable context content
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.