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

Consider to remove IntExemplar and offer only DoubleExemplar (a.k.a Exemplar) #256

Closed
bogdandrutu opened this issue Feb 12, 2021 · 1 comment · Fixed by #281
Closed

Consider to remove IntExemplar and offer only DoubleExemplar (a.k.a Exemplar) #256

bogdandrutu opened this issue Feb 12, 2021 · 1 comment · Fixed by #281

Comments

@bogdandrutu
Copy link
Member

bogdandrutu commented Feb 12, 2021

This decision was made in the initial beta release of the metrics, but after using this data model in the collector for some time, I came to the conclusion that they are a bit harmful (I have a bunch of places where I have to deal with conversion for this extra type). By using only one Exemplar we may lose precision for the value, but how large should the value be to have this problem, based on the IEEE 754 the maximum value is ~2^53 (I found on a stackoverflow thread that the value seem to be 9007199254740992) to not lose precision at all. I think this is a reasonable compromise for usability.

The deprecation will work this way:

  • Rename current DoubleExemplar to just Exemplar.
  • Everywhere where we use IntExemplar deprecate that field and replace it with Exemplars.
  • When receiving a deprecated IntExemplar field, receiver can convert it into the new Exemplar field, only operation needed is to convert the int64 value into double.
  • In the collector we will do this in the OTLP receiver, and will remove access to the deprecated field.

/cc @jmacd @open-telemetry/specs-metrics-approvers

@jmacd
Copy link
Contributor

jmacd commented Feb 23, 2021

Strong support, like #257.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants