-
Notifications
You must be signed in to change notification settings - Fork 258
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
Is performance important enough for the MetricDescriptor Type to encode it as a unit64? #189
Comments
We have discussed that the performance implications of this are more important in the collector. Clients can cache descriptor objects and/or use alternate encoders fairly easily. |
It is very likely that there will be significant performance gains for single datapoint metrics. Benchmarking using https://github.com/tigrannajaryan/exp-otelproto should be easy. |
True, but I suspect most clients won't bother, so would be good not to rely on this. Using bitmasks is trivial in most (?) languages, so I don't think usability-wise it is any worse than |
(In #168 I wrote a program to generate the bits of all valid combinations...) |
@tigrannajaryan are you most worried about bytes on the wire or number of allocations? The biggest problem with PR #168 was that it makes things harder to use since not every possible combination in a bitmap is valid. |
As an example the current Gauge does not have temporality and we tried to add a new temporality just for that, then found hard to reason about all the corner cases |
The later.
Can we provide valid combinations of bitmasks as enums/consts and clearly document that other combinations are not valid? |
Let me give a try to use gogo proto to avoid allocations. If that works we should not worry and complicate things. |
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Bogdan Drutu <[email protected]>
Currently there is a TODO in the metrics proto that needs a decision:
The text was updated successfully, but these errors were encountered: