Class NeverSampleSampler
java.lang.Object
io.opencensus.trace.Sampler
io.opencensus.trace.samplers.NeverSampleSampler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of thisSampler.booleanshouldSample(SpanContext parentContext, Boolean hasRemoteParent, TraceId traceId, SpanId spanId, String name, List<Span> parentLinks) Called duringSpancreation to make a sampling decision.toString()
-
Constructor Details
-
NeverSampleSampler
NeverSampleSampler()
-
-
Method Details
-
shouldSample
public boolean shouldSample(@Nullable SpanContext parentContext, @Nullable Boolean hasRemoteParent, TraceId traceId, SpanId spanId, String name, List<Span> parentLinks) Description copied from class:SamplerCalled duringSpancreation to make a sampling decision.- Specified by:
shouldSamplein classSampler- Parameters:
parentContext- the parent span'sSpanContext.nullif this is a root span.hasRemoteParent-trueif the parentSpanis remote.nullif this is a root span.traceId- theTraceIdfor the newSpan. This will be identical to that in the parentContext, unless this is a root span.spanId- theSpanIdfor the newSpan.name- the name of the newSpan.parentLinks- the parentLinks associated with the newSpan.- Returns:
trueif theSpanis sampled.
-
getDescription
Description copied from class:SamplerReturns the description of thisSampler. This may be displayed on debug pages or in the logs.Example: "ProbabilitySampler{0.000100}"
- Specified by:
getDescriptionin classSampler- Returns:
- the description of this
Sampler.
-
toString
-