-
Notifications
You must be signed in to change notification settings - Fork 940
Description
Exemplar filters filter measurements prior to offering them to an exemplar reservoir. This "pre-filtering" functionality overlaps with the exemplar reservoir which will also sample measurements it is offered. Do we need these two different objects or can they be simplified into one?
Scope
Single global On/Off switch
The exemplar filter has be stated to be an object associated with the entire SDK, not just a single metric pipeline like the exemplar reservoir. This means that it can be used to "globally" apply pre-filtering functionality (i.e. turn on or off exemplars). For this reason it is argued that exemplar filters should remain independent.
Conversely, exemplar filters cannot be applied more specific then the entire SDK. If a user want some instruments to offer all measurements, some to only offer sampled, and others to drop all they cannot achieve this using exemplar filters. For this reason it is argued that exemplar filters should be combinable with exemplar reservoirs directly.
Preventing repetition
Because exemplar filters are applied to the entire SDK, this means every exemplar reservoirs do not need to reproduce the functionality of the exemplar filters. If an exemplar filter was merged into the exemplar reservoir directly, the exemplar reservoir would need to be configurable with each filter setting or a separate reservoir would be needed for each combination of filter-to-reservoir (i.e one for keep all into a random naive reservoir, keep only sampled into a naive reservoir).
For this reason it is argued that exemplar filters should remain independent.
Proposals
Providing decorator exemplar reservoirs
- The "AlwaysOn" exemplar filter is dropped
- The "AlwaysOff' exemplar filter is replaced by a "drop" exemplar reservoir
- The "TraceBased" exemplar filter is replaced with a "decorator" exemplar reservoir
- This new reservoir would accept an exemplar reservoir on creation
- All measurements it is offered are first checked to be sample prior to passing them to the decorated exemplar reservoir
- The default exemplar reservoirs would all be changed to use the trace-based decorator exemplar reservoir
- A "default" exemplar reservoir object would be exposed to users so they can still set global views for all instruments to that will appropriately decorate the default (instrument selected) exemplar reservoir