Versions in this module Expand all Collapse all v1 v1.12.9 Oct 15, 2026 Changes in this version + const LifecycleKey + const TemporalityCumulative + const TemporalityDelta + var ErrInvalidEndpoint = errors.New("telemetry: invalid OTLP endpoint") + var ErrTracingDisabled = errors.New("telemetry: tracing is disabled") + func BuildResource(ctx context.Context, name, version, environment string, ...) (*resource.Resource, error) + func BuildSampler(s Settings) sdktrace.Sampler + func Excluded(path string, prefixes []string) bool + func HTTPClient() *http.Client + func InstrumentTransport(rt http.RoundTripper) http.RoundTripper + func NewForgeSampler(inner sdktrace.Sampler, off bool, wants *atomic.Pointer[[]func() bool]) sdktrace.Sampler + func NormalizeMethod(m string) (method, original string) + func PropagationMiddleware() func(http.Handler) http.Handler + func RouteMatchMiddleware(excludePaths []string) func(http.Handler) http.Handler + func SamplerOff(s Settings) bool + func ServerMiddleware(tp trace.TracerProvider, s Settings) func(http.Handler) http.Handler + type Inputs struct + Code shared.TracingConfig + Environment string + File shared.TracingConfig + Getenv func(string) string + type MetricsInputs struct + Code shared.MetricsExportConfig + File shared.MetricsExportConfig + Getenv func(string) string + type MetricsPusher struct + func NewMetricsPusher(s MetricsSettings, res *resource.Resource, producer sdkmetric.Producer, ...) (*MetricsPusher, error) + func (p *MetricsPusher) Settings() MetricsSettings + func (p *MetricsPusher) Shutdown(ctx context.Context) error + func (p *MetricsPusher) Start(ctx context.Context) error + type MetricsSettings struct + Enabled bool + Endpoint string + Headers map[string]string + Interval time.Duration + Temporality string + Warnings []string + func ResolveMetrics(in MetricsInputs) MetricsSettings + type Provider struct + func NewProvider(ctx context.Context, s Settings, res *resource.Resource, log logger.Logger) (*Provider, error) + func (p *Provider) RegisterSpanProcessor(sp sdktrace.SpanProcessor) error + func (p *Provider) Resource() *resource.Resource + func (p *Provider) Settings() Settings + func (p *Provider) Shutdown(ctx context.Context) error + func (p *Provider) TracerProvider() trace.TracerProvider + type Settings struct + Enabled bool + Endpoint string + ExcludePaths []string + Headers map[string]string + Propagators []string + Resource map[string]string + ResponseHeader string + SampleRatio float64 + SamplerName string + SpanLabels bool + Warnings []string + func Resolve(in Inputs) Settings + type StatusRecorder struct + func NewStatusRecorder(w http.ResponseWriter) *StatusRecorder + func (r *StatusRecorder) BytesWritten() int64 + func (r *StatusRecorder) Flush() + func (r *StatusRecorder) Hijack() (net.Conn, *bufio.ReadWriter, error) + func (r *StatusRecorder) Status() int + func (r *StatusRecorder) Unwrap() http.ResponseWriter + func (r *StatusRecorder) Write(b []byte) (int, error) + func (r *StatusRecorder) WriteHeader(code int)