Problem
Alert history fingerprints can lose precision when the backend returns an Alertmanager uint64 as a JSON number above Number.MAX_SAFE_INTEGER.
In a live read-only test with @jpowersdev/signoz@1.2.0, one alerts triage response represented the same labeled alert instance differently across sections:
topContributors[0].fingerprint: "13794282291722923096" (precision-preserving string)
- matching timeline event fingerprint:
13794282291722924000 (rounded JavaScript number)
alerts history <rule-id> --output json emitted the same rounded numeric value.
The top-contributors endpoint already avoids this by rewriting large unquoted fingerprint values to strings before JSON.parse. Rule-history timeline decoding still goes through the generated client and loses precision first.
Impact
Automation cannot reliably join timeline/history events to top contributors or other Alertmanager data by fingerprint. The JSON type also differs between related command sections.
Reproduction
- Use a rule whose Alertmanager fingerprint exceeds
Number.MAX_SAFE_INTEGER.
- Run
signoz alerts triage <rule-id> --output json.
- Compare the sole top-contributor fingerprint with the matching timeline event.
- Run
signoz alerts history <rule-id> --output json and compare again.
Acceptance criteria
- Preserve exact uint64 fingerprints in
alerts history and triage timeline output.
- Emit fingerprints consistently as decimal strings across history, timeline, and top-contributor JSON.
- Add tests using values above
Number.MAX_SAFE_INTEGER that would otherwise round.
- Keep existing table and stream output readable and backward-compatible where practical.
- Do not regress the precision-safe top-contributor decoder.
Problem
Alert history fingerprints can lose precision when the backend returns an Alertmanager uint64 as a JSON number above
Number.MAX_SAFE_INTEGER.In a live read-only test with
@jpowersdev/signoz@1.2.0, onealerts triageresponse represented the same labeled alert instance differently across sections:topContributors[0].fingerprint:"13794282291722923096"(precision-preserving string)13794282291722924000(rounded JavaScript number)alerts history <rule-id> --output jsonemitted the same rounded numeric value.The top-contributors endpoint already avoids this by rewriting large unquoted fingerprint values to strings before
JSON.parse. Rule-history timeline decoding still goes through the generated client and loses precision first.Impact
Automation cannot reliably join timeline/history events to top contributors or other Alertmanager data by fingerprint. The JSON type also differs between related command sections.
Reproduction
Number.MAX_SAFE_INTEGER.signoz alerts triage <rule-id> --output json.signoz alerts history <rule-id> --output jsonand compare again.Acceptance criteria
alerts historyand triage timeline output.Number.MAX_SAFE_INTEGERthat would otherwise round.