From f2517388c86757fa4b59cb91b40e5611575d63f0 Mon Sep 17 00:00:00 2001 From: shayyxi Date: Mon, 1 May 2023 18:47:48 +0200 Subject: [PATCH] doc failure correction. parse float argument correction. Signed-off-by: shayyxi --- docs/tracing.md | 2 ++ pkg/tracing/otlp/otlp.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/tracing.md b/docs/tracing.md index b0405945cd9..1be445f2755 100644 --- a/docs/tracing.md +++ b/docs/tracing.md @@ -97,6 +97,8 @@ config: key_file: "" server_name: "" insecure_skip_verify: false + sampler_name: "" + sampler_arg: "" ``` ### Jaeger diff --git a/pkg/tracing/otlp/otlp.go b/pkg/tracing/otlp/otlp.go index 3be942852b1..93041712aca 100644 --- a/pkg/tracing/otlp/otlp.go +++ b/pkg/tracing/otlp/otlp.go @@ -100,7 +100,7 @@ func buildSampler(samplerName string, samplerArg string) (tracesdk.Sampler, erro case NeverSample: return tracesdk.ParentBased(tracesdk.NeverSample()), nil case RatioBasedSample: - arg, err := strconv.ParseFloat(samplerArg, 1) + arg, err := strconv.ParseFloat(samplerArg, 64) if err != nil { return tracesdk.ParentBased(tracesdk.TraceIDRatioBased(1.0)), err }