Skip to content

Get rid of instrumentation_class in metric definitions for internal events

Problem

Currently, metric definitions for metrics that use the data_source: internal_events need to provide an instrumentation_class.

For metrics that are total counts this is TotalCountMetric and for unique counts this is RedisHLLMetric.

This is problematic due to two reasons:

  1. It is an implementation detail that can be confusing for users instrumenting a metric
  2. It is actually redundant data. Depending on whether a metric includes a unique parameter or not which instrumentation class is used should be inferrable. Having it configurable in the metrics file can actually lead to misbehaviors or bugs if the two informations don't match up (e.g. instrumentation_class: TotalCountMetric but also a unique count provided.

Desired Outcome

Metrics with data_source: internal_events don't need an instrumentation_class. Ideally it would even be enforced that they don't have one.

Proposed Solution

TBD

How to verify

Both Total Count and unique metrics with data_source: internal_events and without an instrumentation_class still compute correctly.