Conversation
implement a span suppression strategy, modelled on Java's implementation. An instrumentation can suppress some later spans (stop them from being created), via SpanSuppression::suppressSpanKind() The strategies are stored in Context, and can be activated and detached like other context values. Instrumentations should check span suppression before creating a new span.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1583 +/- ##
============================================
- Coverage 70.86% 70.84% -0.02%
- Complexity 2765 2798 +33
============================================
Files 407 411 +4
Lines 8346 8424 +78
============================================
+ Hits 5914 5968 +54
- Misses 2432 2456 +24
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 12 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Nevay
left a comment
There was a problem hiding this comment.
Should SpanSuppression be marked experimental? We should have a plan on how to evolve the API to allow semconv based suppression considering that this is the default choosen by Java.
Would prefer an injectable abstraction layer similar to Javas SpanSuppressionStrategy instead of static methods to allow users to opt-out of span suppression.
|
I wonder if this could also be used for limitting the recursive span scenario with templating languages we talked about. @brettmc Do you see that we could enhance this for looking at presence of attributes or instrumentation names? Example: Twig is rendering templates recursively As a library author, i would probably want to define or similar, so that i can capture the overall render time of the templates, but stop recursion on the top level. |
I've made a start on this. I think there are some improvements that could be made:
@cedricziel yes, I think we could. In the twig example, what feature of the recursive spans can be used to make the decision? The tracer name? One of the SemConv attributes? This could be helpful in working out the possible inputs to the decision. |
implement a span suppression strategy, modelled on Java's implementation. An instrumentation can suppress some later spans (stop them from being created), via
SpanSuppression::suppressSpanKind(). The strategies are stored in Context, and can be activated and detached like other context values. Instrumentations should check span suppression before creating a new span.Closes: #1579