tracer

package
v3.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package tracer provides mechanisms to propagate tracer in context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) otrace.Tracer

FromContext returns the tracer that is attatched to the context or returns a new anonymous tracer if it does not exist.

func NewContext

func NewContext(ctx context.Context, t otrace.Tracer) context.Context

NewContext returns a derived context with the tracer set.

func NewContextWithTracer

func NewContextWithTracer(ctx context.Context, name string, opts ...otrace.TracerOption) context.Context

NewContextWithTracer returns a derived context with a new tracer set.

func StartFromContext

func StartFromContext(ctx context.Context, name string, opts ...otrace.SpanStartOption) (context.Context, otrace.Span)

StartFromContext returns a derived context with a new span started from the tracer in context.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL