feat: allow service_name override (#112875)

This commit is contained in:
Costa Alexoglou 2025-10-23 16:36:23 +02:00 committed by GitHub
parent 6b2b9bd7c2
commit 2b9c138d7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -92,6 +92,12 @@ func ParseTracingConfig(cfg *setting.Cfg) (*TracingConfig, error) {
return nil, err return nil, err
} }
// Allow overriding service name via configuration
serviceName := section.Key("service_name").MustString("")
if serviceName != "" {
tc.ServiceName = serviceName
}
// if sampler_type is set in tracing.opentelemetry, we ignore the config in tracing.jaeger // if sampler_type is set in tracing.opentelemetry, we ignore the config in tracing.jaeger
sampler := section.Key("sampler_type").MustString("") sampler := section.Key("sampler_type").MustString("")
if sampler != "" { if sampler != "" {