Skip to content

Commit

Permalink
doc failure correction. parse float argument correction.
Browse files Browse the repository at this point in the history
Signed-off-by: shayyxi <[email protected]>
  • Loading branch information
shayyxi committed May 1, 2023
1 parent 7c82858 commit f251738
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ config:
key_file: ""
server_name: ""
insecure_skip_verify: false
sampler_name: ""
sampler_arg: ""
```

### Jaeger
Expand Down
2 changes: 1 addition & 1 deletion pkg/tracing/otlp/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f251738

Please sign in to comment.