Class RequestSampler
java.lang.Object
org.opensearch.telemetry.tracing.sampler.RequestSampler
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.samplers.Sampler
RequestSampler based on HeadBased sampler
-
Constructor Summary
ConstructorsConstructorDescriptionRequestSampler(io.opentelemetry.sdk.trace.samplers.Sampler fallbackSampler) Creates request sampler which applies based on all applicable sampler -
Method Summary
Modifier and TypeMethodDescriptionio.opentelemetry.sdk.trace.samplers.SamplingResultshouldSample(io.opentelemetry.context.Context parentContext, String traceId, String name, io.opentelemetry.api.trace.SpanKind spanKind, io.opentelemetry.api.common.Attributes attributes, List<io.opentelemetry.sdk.trace.data.LinkData> parentLinks) toString()
-
Constructor Details
-
RequestSampler
public RequestSampler(io.opentelemetry.sdk.trace.samplers.Sampler fallbackSampler) Creates request sampler which applies based on all applicable sampler- Parameters:
fallbackSampler- Sampler
-
-
Method Details
-
shouldSample
public io.opentelemetry.sdk.trace.samplers.SamplingResult shouldSample(io.opentelemetry.context.Context parentContext, 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
-
getDescription
- Specified by:
getDescriptionin interfaceio.opentelemetry.sdk.trace.samplers.Sampler
-
toString
-