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
  • Loading branch information
damemi committed Aug 5, 2022
1 parent 9d7e108 commit 1eac202
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 @@ -849,6 +849,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 1eac202

Please sign in to comment.