Class TestSampler
java.lang.Object
org.eclipse.microprofile.telemetry.tracing.tck.spi.TestSampler
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.samplers.Sampler
A test sampler which looks for the "test.sample.me" attribute to decide whether a span should be sampled
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.sdk.trace.samplers.SamplingResultshouldSample(io.opentelemetry.context.Context context, String traceId, String name, io.opentelemetry.api.trace.SpanKind spanKind, io.opentelemetry.api.common.Attributes attributes, List<io.opentelemetry.sdk.trace.data.LinkData> parentLinks)
-
Field Details
-
SAMPLE_ME
-
-
Constructor Details
-
TestSampler
public TestSampler()
-
-
Method Details
-
getDescription
- Specified by:
getDescriptionin interfaceio.opentelemetry.sdk.trace.samplers.Sampler
-
shouldSample
public io.opentelemetry.sdk.trace.samplers.SamplingResult shouldSample(io.opentelemetry.context.Context context, String traceId, String name, io.opentelemetry.api.trace.SpanKind spanKind, io.opentelemetry.api.common.Attributes attributes, List<io.opentelemetry.sdk.trace.data.LinkData> parentLinks) - Specified by:
shouldSamplein interfaceio.opentelemetry.sdk.trace.samplers.Sampler
-