Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SpanFromContext ¶
SpanFromContext returns the current span from context.
Types ¶
type Config ¶
type Config struct {
Enabled bool `mapstructure:"enabled"`
Endpoint string `mapstructure:"endpoint"` // OTLP HTTP endpoint (e.g., "localhost:4318")
SampleRate float64 `mapstructure:"sample_rate"` // 0.0-1.0
Insecure bool `mapstructure:"insecure"` // Use HTTP instead of HTTPS
}
Config holds telemetry configuration.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider wraps the OpenTelemetry TracerProvider.
func NewProvider ¶
func NewProvider(ctx context.Context, cfg Config, serviceName, serviceVersion string) (*Provider, error)
NewProvider creates a new telemetry provider.
Click to show internal directories.
Click to hide internal directories.