Description
Describe the current state
In the metrics module, the protobuf
dependency is imported across way too many files.
This is because originally the idea was to always represent the data with the protobuf messages.
After some thoughts, I reckon this idea is inefficient and impractical.
Describe the desired state
A better design would see the proto ser/deser confined into a single module, ideally in an exporter
modules.
OTLP is just another exported format, and as such should be pluggable into any MetricExporter
.
What we need is data structures capable of representing the metrics and their attributes with the smallest overhead possible and the control we need to perform data conversion.
Then a OTLP exporter would have functionalities to convert the internal data structures to OTLP using as destination the protobuf messages generated via codegen, resulting into the binary payloads sent through OTLP.