This talks about Exemplar defaults overall, this is a related, but different issue, related to Exemplars.
Based on stress tests/benchmarks in OTel .NET, turning on exemplars drops perf by 10-30% (For Histograms, the drop is less, but Counters/other-sync-instruments suffer the worst perf drop). As per the current wording, the default Reservoir to be used for every non Histograms is the SimpleFixedSizeExemplarReservoir.
Consider the following scenario:
- When a end users upgrades to the newer SDKs (supporting Exemplars), and turn the feature on (whether its on/off by default could be clarified separately), there is perf drop for all instruments. I think, a common scenario is - users are interested in Exemplars for their latency metric (Histogram), but not so much for other instruments like counters/etc. But all their instruments now pay for the cost of Exemplars.
- It is not possible to turn off
ExemplarFilter per instrument, as ExemplarFilter is applied at provider level
- Users can use Views to change
ExemplarReservoir per instrument, however, there is no "no-op" ExemplarReservoir in the spec. This forces users to write one themselves, and then selectively apply that to instruments.
Some thoughts on fixing this:
- Not do anything in the spec, and let languages solve it with different defaults (if perf drop is significant, and is a concern for a language)
- Change the defaults and make Exemplars opt-in on a instrument-by-instrument basis. So users can selectively enable it for those instruments where they see value.
- Introduce No-OpExemplarReservoir part of the spec, and make it the default for non-Histogram instruments, assuming Histograms is where most users are interested in Exemplars, and the fact that perf drop is most significant for non-histograms (.NET example. would love to see if other languages observe similar).
- Others/please share!
This talks about Exemplar defaults overall, this is a related, but different issue, related to Exemplars.
Based on stress tests/benchmarks in OTel .NET, turning on exemplars drops perf by 10-30% (For Histograms, the drop is less, but Counters/other-sync-instruments suffer the worst perf drop). As per the current wording, the default Reservoir to be used for every non Histograms is the
SimpleFixedSizeExemplarReservoir.Consider the following scenario:
ExemplarFilterper instrument, asExemplarFilteris applied at provider levelExemplarReservoirper instrument, however, there is no "no-op"ExemplarReservoirin the spec. This forces users to write one themselves, and then selectively apply that to instruments.Some thoughts on fixing this: