Add agent dsl to disable instrumentations#1714
Conversation
fractalwrench
left a comment
There was a problem hiding this comment.
This feels like a reasonable approach. I'm not convinced on the name, perhaps something like disabledInstrumentations or suppressedInstrumentation is more descriptive?
While reviewing I also noticed that OtelRumConfig has shouldDiscoverInstrumentations(). I'd be inclined to keep the scope of this PR tight, but whether we need something similar should be part of related discussion IMO.
I didn't include the word 'instrumentation' in the name because it's already scoped to the 'instrumentations' block....which would make it redundant. I think I see where you're coming from, though. Nothing else (yet?) in the DSL uses the infinitive verb form (tho it's not super uncommon in other DSLs I think). Maybe you would like
Oh that definitely occurred to me as well, and we should add that....agree not in this PR. |
|
Created #1716 to follow up on this idea. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1714 +/- ##
==========================================
- Coverage 62.41% 62.10% -0.32%
==========================================
Files 160 159 -1
Lines 3480 3446 -34
Branches 353 347 -6
==========================================
- Hits 2172 2140 -32
+ Misses 1209 1206 -3
- Partials 99 100 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Resolves #411.
By default, the instrumentation loader will find all instrumentation on the classpath and load it. This new DSL method allows suppressing some of those instrumentations if they might be unwanted.
I like the simplicity of this approach, because it just leverages the existing mechanism built into the
OtelRumConfigfrom core and the existingInstrumentationConfigurationDSL. One shortcoming, though, is that users might want this to be as lazy as possible -- evaluated just before install time (so that they can make a calculation or whatever). That approach would be considerably more involved.