From 003f04ca4563acb5d4c262ca391dca0ea05bf711 Mon Sep 17 00:00:00 2001 From: Tore Date: Thu, 25 Jan 2024 08:32:59 +0100 Subject: [PATCH] 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. --- docs/user-guide/nginx-configuration/configmap.md | 4 ++-- internal/ingress/controller/config/config.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user-guide/nginx-configuration/configmap.md b/docs/user-guide/nginx-configuration/configmap.md index 6bd6eb945..680c77b53 100644 --- a/docs/user-guide/nginx-configuration/configmap.md +++ b/docs/user-guide/nginx-configuration/configmap.md @@ -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 diff --git a/internal/ingress/controller/config/config.go b/internal/ingress/controller/config/config.go index 35e50a069..8e684f428 100644 --- a/internal/ingress/controller/config/config.go +++ b/internal/ingress/controller/config/config.go @@ -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,