Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove common labels from MetricDescriptor (#144)
Resolves: #141 Metric proto previously allowed Labels in 2 places: in the MetricDescriptor and in each DataPoint. The semantics is that Labels in MetricDescriptor apply to all DataPoints. This requires complicated and expensive merging of Labels maps (which possibly is made even more expensive since they are stored as lists, requiring either intermediary data structures or O(nm) merging) when performing translations from OTLP to other formats that have no equivalent notion of having label keys per data point and per group of data points (e.g. OpenCensus). This commit removes Labels from MetricDescriptor. My understanding is that there is currently no client library that emits MetricDescriptor with labels so this is not used and can be safely removed. This will simplify and make faster translation code in the Collector. If this is needed we can think carefully about adding it back after there is a clear justification and tradeoffs are well understood. Co-authored-by: Bogdan Drutu <bogdandrutu@gmail.com>
- Loading branch information