From b36a7e95dc2436e554b45d2a72e96bd15bf08801 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> Signed-off-by: Sebastian Rabenhorst --- CHANGELOG.md | 1 + pkg/tracing/jaeger/config_yaml.go | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57a05310b43..9af04b5ae59 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 fae3f8c21cc..1378c861590 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)