Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove common labels from MetricDescriptor #144

Conversation

tigrannajaryan
Copy link
Member

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.

Resolves: open-telemetry#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.
@bogdandrutu
Copy link
Member

I agree that this was a premature optimization and we can always bring it back later.

@bogdandrutu bogdandrutu merged commit 3a34ab5 into open-telemetry:master Apr 27, 2020
@tigrannajaryan tigrannajaryan deleted the feature/tigran/remove-common-labels branch April 28, 2020 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dual placement of Labels makes certain translations expensive
5 participants