Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecordDBError ¶
RecordDBError records an error on the current span.
func SpanFromContext ¶
SpanFromContext returns the current span from context.
Types ¶
type Config ¶
type Config struct {
ServiceName string
ServiceVersion string
Environment string
OTLPEndpoint string // e.g. "localhost:4318" for HTTP
SampleRate float64
Enabled bool
}
Config holds the configuration for the tracer provider.
type TracerProvider ¶
type TracerProvider struct {
// contains filtered or unexported fields
}
TracerProvider wraps the OpenTelemetry SDK tracer provider with shutdown support.
func NewTracerProvider ¶
func NewTracerProvider(ctx context.Context, cfg Config) (*TracerProvider, error)
NewTracerProvider creates and configures a new OpenTelemetry tracer provider. If tracing is disabled, returns a no-op provider.
Click to show internal directories.
Click to hide internal directories.