Align OpenTelemetry tracing and metrics configurations

Co-authored-by: Michael <michael.matur@gmail.com>
This commit is contained in:
Romain 2024-02-06 10:04:05 +01:00 committed by GitHub
parent d7ec0cedbf
commit bb6cd581a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 587 additions and 341 deletions

View file

@ -20,7 +20,7 @@ import (
// Backend is an abstraction for tracking backend (OpenTelemetry, ...).
type Backend interface {
Setup(serviceName string, sampleRate float64, globalAttributes map[string]string, headers map[string]string) (trace.Tracer, io.Closer, error)
Setup(serviceName string, sampleRate float64, globalAttributes map[string]string) (trace.Tracer, io.Closer, error)
}
// NewTracing Creates a Tracing.
@ -37,7 +37,7 @@ func NewTracing(conf *static.Tracing) (trace.Tracer, io.Closer, error) {
backend = defaultBackend
}
return backend.Setup(conf.ServiceName, conf.SampleRate, conf.GlobalAttributes, conf.Headers)
return backend.Setup(conf.ServiceName, conf.SampleRate, conf.GlobalAttributes)
}
// TracerFromContext extracts the trace.Tracer from the given context.