opentelemetry-java icon indicating copy to clipboard operation
opentelemetry-java copied to clipboard

Can Sampler#shouldSample method add a param `InstrumentationScopeInfo`?

Open IcebergXTY opened this issue 2 years ago • 2 comments

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);

IcebergXTY avatar Jan 29 '23 09:01 IcebergXTY

We can figure out how to add this only if it added to the official otel specification.

jkwatson avatar Jan 29 '23 16:01 jkwatson

Here's the spec issue tracking this feature request. @IcebergXTY, it would be helpful if you could describe your use case in that issue.

jack-berg avatar Jan 29 '23 17:01 jack-berg