We currently have the logic for metricset serialization in three places:
- Internal metrics
- Micrometer metrics
- OpenTelemetry metrics
With #2968 we added the MetricSetSerializer class, which is used for the OpenTelemetry metricset serialization.
This class is generic enough that we should be able to extract a superclass which delegates just the labels serialization to its subclasses. We can then use this base class for all places where we serialize metricsets.
We currently have the logic for metricset serialization in three places:
With #2968 we added the
MetricSetSerializerclass, which is used for the OpenTelemetry metricset serialization.This class is generic enough that we should be able to extract a superclass which delegates just the
labelsserialization to its subclasses. We can then use this base class for all places where we serialize metricsets.