Please take the OpenCensus user survey

Always

Always sampler

The Always sampler always returns a decision of True for any sampling decision

Code samples

import "go.opencensus.io/trace"

_ = trace.AlwaysSample()
Samplers.alwaysSample();
// Samplers are potentially expensive to construct. Use one long-lived
// sampler instead of constructing one for every Span.
static opencensus::trace::AlwaysSampler sampler;
const root = new RootSpan(tracer);
const sampler = SamplerBuilder.getSampler(1); // Always samples when value is >= 1
const samplerShouldSample = sampler.shouldSample(root.traceId);

Reference

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