Skip to content

Conversation

@rkistner
Copy link
Contributor

For storage metrics over 2GB, the limit of a 32-bit signed integer is reached, so MongoDB returns the value as a bigint. OpenTelemetry metrics doesn't support bigint, so it just omit those metrics, resulting in no reported value.

This change forces conversion of these metrics to a number. We should not get any loss of precision in any realistic metric values, since number can still accurately store values up to 2^53-1.

@changeset-bot
Copy link

changeset-bot bot commented Dec 23, 2024

🦋 Changeset detected

Latest commit: 2a10383

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@powersync/service-core Patch
@powersync/service-module-mongodb Patch
@powersync/service-module-mysql Patch
@powersync/service-module-postgres Patch
@powersync/service-image Patch
test-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rkistner rkistner marked this pull request as ready for review December 23, 2024 09:04
@rkistner rkistner merged commit 010f6e2 into main Dec 23, 2024
15 checks passed
@rkistner rkistner deleted the fix-large-storage-metrics branch December 23, 2024 09:05
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.

2 participants