fix: otlp doc + potential panic

This commit is contained in:
Michael 2024-08-29 14:30:05 +02:00 committed by GitHub
parent 6b1a584c2b
commit 2714831a4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -170,7 +170,6 @@ Defines the list of query parameters to not redact.
```yaml tab="File (YAML)" ```yaml tab="File (YAML)"
tracing: tracing:
otlp:
safeQueryParams: safeQueryParams:
- bar - bar
- buz - buz
@ -178,10 +177,9 @@ tracing:
```toml tab="File (TOML)" ```toml tab="File (TOML)"
[tracing] [tracing]
[tracing.otlp]
safeQueryParams = ["bar", "buz"] safeQueryParams = ["bar", "buz"]
``` ```
```bash tab="CLI" ```bash tab="CLI"
--tracing.otlp.safeQueryParams=bar,buz --tracing.safeQueryParams=bar,buz
``` ```

View file

@ -212,6 +212,9 @@ type Tracing struct {
func (t *Tracing) SetDefaults() { func (t *Tracing) SetDefaults() {
t.ServiceName = "traefik" t.ServiceName = "traefik"
t.SampleRate = 1.0 t.SampleRate = 1.0
t.OTLP = &opentelemetry.Config{}
t.OTLP.SetDefaults()
} }
// Providers contains providers configuration. // Providers contains providers configuration.