We have use cases in the environment, where monotonic counters are stored as unit64_t values, particularly for Open Connect Appliances. Since the monotonic counter data types in spectatord are convenience wrappers that help users avoid the need to calculate their own deltas, they should be uint64_t types here. The actual deltas that are calculated and sent to the backend are doubles, which matches the backend data type used by Atlas. This is acceptable, because the deltas are expected to be much smaller values.
Some of the newer thin clients, such as spectator-go, specify the uint64 data type for monotonic counters.
Note that the previous implementation for monotonic counters did not handle rollovers correctly, and this change fixes that behavior for both types.
We have use cases in the environment, where monotonic counters are stored as unit64_t values, particularly for Open Connect Appliances. Since the monotonic counter data types in spectatord are convenience wrappers that help users avoid the need to calculate their own deltas, they should be uint64_t types here. The actual deltas that are calculated and sent to the backend are doubles, which matches the backend data type used by Atlas. This is acceptable, because the deltas are expected to be much smaller values.
Some of the newer thin clients, such as spectator-go, specify the uint64 data type for monotonic counters.
Note that the previous implementation for monotonic counters did not handle rollovers correctly, and this change fixes that behavior for both types.