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

fix monotonic counter implementations #100

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

copperlight
Copy link
Collaborator

This change is a companion to the fix for monotonic counter implementations in spectatord.

Netflix-Skunkworks/spectatord#90

The original monotonic counter (C) was always intended to be used for the case where a monotonic data source needs to be transformed into base units for recording data. For example, transforming nanoseconds into seconds. This requires division, which results in floats.

There is a valid use case for handling uints in monotonic counters, if the data source is already in a base unit, such as bytes. Thus, a new meter type U is added to spectatord which supports this use case.

This change is a companion to the fix for monotonic counter implementations
in spectatord.

Netflix-Skunkworks/spectatord#90

The original monotonic counter (`C`) was always intended to be used for the
case where a monotonic data source needs to be transformed into base units
for recording data. For example, transforming nanoseconds into seconds. This
requires division, which results in floats.

There is a valid use case for handling uints in monotonic counters, if the
data source is already in a base unit, such as bytes. Thus, a new meter type
`U` is added to spectatord which supports this use case.
@copperlight copperlight merged commit 22102a0 into Netflix:main Jun 14, 2024
2 checks passed
@copperlight copperlight deleted the fix-monotonic-counters branch June 14, 2024 22:06
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.

1 participant