Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTraceIDFromContext ¶
GetTraceIDFromContext return the trace ID from the context
Types ¶
type Option ¶
type Option struct {
trace.TracerOption
}
Option is wraps up trace.Option and applies an option to a TracerConfig.
type Provider ¶
type Provider struct {
*sdktrace.TracerProvider
}
Provider provides access to instrumentation Tracers.
func NewTracerProvider ¶
func NewTracerProvider(c *ProviderConfig) (*Provider, func() error, error)
NewTracerProvider initializes the provider for OpenTelemetry traces.
type ProviderConfig ¶
type ProviderConfig struct { // ServiceName indicates the service name to trace. ServiceName string // CollectorAddress indicates the collector's address. CollectorAddress string // CollectorBasicAuthCreds indicates the collector's basic auth credentials. CollectorBasicAuthCreds string // CollectorConnectTimeout indicate the duration to timeout when connecting to the collector. // By default, it is 5 * time.Second. CollectorConnectTimeout time.Duration }
ProviderConfig indicates how the OpenTelemetry tracer provider should be initialised.
type Span ¶
Span wraps up trace.Span which is the individual component of a trace. It represents a single named and timed operation of a workflow that is traced. A Tracer is used to create a Span and it is then up to the operation the Span represents to properly end the Span when the operation itself ends.
Click to show internal directories.
Click to hide internal directories.