From 5cd2b21407913fcee108fda6c438aae00b1f6d02 Mon Sep 17 00:00:00 2001 From: Vasiliy Rumyantsev <4119114+xBazilio@users.noreply.github.com> Date: Mon, 23 Jan 2023 20:18:54 +0300 Subject: [PATCH] tracing: fixed panic because of nil sampler (#6066) * fixed panic because of nil sampler Signed-off-by: Vasiliy Rumyantsev <4119114+xBazilio@users.noreply.github.com> * added CHANGELOG entry Signed-off-by: Vasiliy Rumyantsev <4119114+xBazilio@users.noreply.github.com> Signed-off-by: Vasiliy Rumyantsev <4119114+xBazilio@users.noreply.github.com> --- CHANGELOG.md | 1 + pkg/tracing/jaeger/config_yaml.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57a05310b4..9af04b5ae5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#5995](https://github.com/thanos-io/thanos/pull/5995) Sidecar: Loads the TLS certificate during startup. - [#6044](https://github.com/thanos-io/thanos/pull/6044) Receive: mark ouf of window errors as conflict, if out-of-window samples ingestion is activated +- [#6066](https://github.com/thanos-io/thanos/pull/6066) Tracing: fixed panic because of nil sampler ### Changed diff --git a/pkg/tracing/jaeger/config_yaml.go b/pkg/tracing/jaeger/config_yaml.go index fae3f8c21c..1378c86159 100644 --- a/pkg/tracing/jaeger/config_yaml.go +++ b/pkg/tracing/jaeger/config_yaml.go @@ -141,6 +141,7 @@ func getSampler(config Config) tracesdk.Sampler { sampler = jaegerremote.New(config.ServiceName, remoteOptions...) // Fallback always to default (rate limiting). case SamplerTypeRateLimiting: + fallthrough default: // The same config options are applicable to both remote and rate-limiting samplers. remoteOptions := getRemoteOptions(config)