chore: revert back otel-sampler settings

The documentation was inconsistent with the default value i config.go. To avoid breaking change, set OtelSampler back to AlwaysOn and update documentation to reflect this. The documentation was previously wrong.
This commit is contained in:
Tore 2024-01-25 08:32:59 +01:00
parent 6bf7bac7ab
commit 003f04ca45
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View file

@ -1115,9 +1115,9 @@ Specifies sample rate for any traces created. _**default:**_ 0.01
## otel-sampler
Specifies the sampler to be used when sampling traces. The available samplers are: AlwaysOff, AlwaysOn, TraceIdRatioBased, remote. _**default:**_ AlwaysOff
Specifies the sampler to be used when sampling traces. The available samplers are: AlwaysOff, AlwaysOn, TraceIdRatioBased, remote. _**default:**_ AlwaysOn
AlwaysOn is equivalent to setting [otel-sampler-ratio](#otel-sampler-ratio) to "1" and otel-sampler to "TraceIdRatioBased".
"AlwaysOn" is equivalent to setting [otel-sampler-ratio](#otel-sampler-ratio) to "1" and otel-sampler to "TraceIdRatioBased".
## main-snippet

View file

@ -891,7 +891,7 @@ func NewDefault() Configuration {
OpentelemetryConfig: "/etc/nginx/opentelemetry.toml",
OtlpCollectorPort: "4317",
OtelServiceName: "nginx",
OtelSampler: "AlwaysOff",
OtelSampler: "AlwaysOn",
OtelSamplerRatio: 0.01,
OtelSamplerParentBased: true,
OtelScheduleDelayMillis: 5000,