Please take the OpenCensus user survey

Never

Never sampler

The Never sampler never returns a decision of False for any sampling decision

import "go.opencensus.io/trace"

_ = trace.NeverSample()
Samplers.neverSample();
// Samplers are potentially expensive to construct. Use one long-lived
// sampler instead of constructing one for every Span.
static opencensus::trace::NeverSampler sampler;
const root = new RootSpan(tracer);
const sampler = SamplerBuilder.getSampler(0); // Never samples when value is <= 0
const samplerShouldNotSample = sampler.shouldSample(root.traceId);

Reference

Resource URL
Go NeverSample trace.NeverSample
Java NeverSample trace.NeverSample
C++ NeverSample trace.NeverSample
Node.js TracerConfig trace.TracerConfig