Observation "granularity"
We received some feedback from users who instrument components that in some cases it would be useful to conditionally create Observations based on configuration. Something similar to log levels, e.g.: let's say we have two "levels" BASIC and DETAILED, if the config is set to DETAILED/ALL, all observations are created, if the config is set to BASIC, only those Observations are created that have BASIC as their level and DETAILED goes to noop.
/cc @jzheaux
We had some discussions internally, what do you think about having these levels: OFF, BASIC, DETAILED, FULL? (OFF would not make sense from instrumentation perspective but only for filtering by the end-users)
Or would you prefer two levels instead of three during instrumentation, like: OFF, BASIC, DETAILED?
@bclozel, @jzheaux, @ttddyy, @mhalbritter @marcingrzejszczak
So, if I map them to logging level, would FULL=trace, DETAILED=debug, BASIC=info appropriate?
For JDBC instrumentation, I have connection, query, and result-set observations, all of which I believe fall into BASIC.
For Spring Security, it seems that most observations would align with the DETAILED level.
As for Boot/Framework observations, they would likely be BASIC.
I wonder what would be the best fit for FULL level observation if we have it.
I'm fine with the 4 levels. FULL would give implementors, like @ttddyy said, a "trace" level if needed.