Skip to content

Commit

Permalink
Change default sampling rate from 100% to 0%
Browse files Browse the repository at this point in the history
This changes the default parent-based trace sampling rate from
100% to 0%. Due to the high QPS etcd can handle, having 100% trace
sampling leads to very high resource usage. Defaulting to 0% means
that only already-sampled traces will be sampled in etcd.

Fixes etcd-io#14310

Signed-off-by: Mike Dame <[email protected]>
  • Loading branch information
damemi authored and openshift-cherrypick-robot committed Oct 7, 2022
1 parent 746b884 commit 661a3f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server/embed/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ func (e *Etcd) setupTracing(ctx context.Context) (exporter tracesdk.SpanExporter
tracesdk.NewTracerProvider(
tracesdk.WithBatcher(exporter),
tracesdk.WithResource(res),
tracesdk.WithSampler(tracesdk.ParentBased(tracesdk.NeverSample())),
),
),
)
Expand Down

0 comments on commit 661a3f6

Please sign in to comment.