opentelemetry-java
opentelemetry-java copied to clipboard
Can Sampler#shouldSample method add a param `InstrumentationScopeInfo`?
Is your feature request related to a problem? Please describe.
We need the scope_name to judge if it needs sampler but this parameter does not exist yet.
Describe the solution you'd like
Add the InstrumentationScopeInfo param like this
SamplingResult shouldSample(
InstrumentationScopeInfo instrumentationScopeInfo,
Context parentContext,
String traceId,
String name,
SpanKind spanKind,
Attributes attributes,
List<LinkData> parentLinks);
We can figure out how to add this only if it added to the official otel specification.
Here's the spec issue tracking this feature request. @IcebergXTY, it would be helpful if you could describe your use case in that issue.