Please take the OpenCensus user survey


Never sampler

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

import ""

_ = trace.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);


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