Skip to content

Fix spendInMicroCurrency and bidAmountMicro to use 64-bit long type#2133

Open
ejsuncy wants to merge 1 commit intoadobe:masterfrom
ejsuncy:fix-micro-currency-long-type
Open

Fix spendInMicroCurrency and bidAmountMicro to use 64-bit long type#2133
ejsuncy wants to merge 1 commit intoadobe:masterfrom
ejsuncy:fix-micro-currency-long-type

Conversation

@ejsuncy
Copy link
Copy Markdown
Contributor

@ejsuncy ejsuncy commented Apr 7, 2026

What the change intends to do

Fixes an integer overflow bug in the Core Paid Media Cost Metrics field group. xdm:spendInMicroCurrency and xdm:bidAmountMicro were defined as type: "integer" without meta:xdmType, causing the platform to treat them as 32-bit integers (max 2,147,483,647). Since micro currency values are computed as amount × 1,000,000, even a ~$2,437 spend overflows and produces an ingestion error.

This change adds "meta:xdmType": "long" to both fields, explicitly declaring them as 64-bit integers.

Breaking changes

None — this is a widening type change (Int32 → Int64). Existing valid values remain valid.

Fixes #2132

Micro currency fields (amount * 1,000,000) can easily exceed the 32-bit
integer ceiling of 2,147,483,647. Add meta:xdmType: long to both
xdm:spendInMicroCurrency and xdm:bidAmountMicro to prevent overflow
errors at real-world spend values.

Fixes adobe#2132

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ejsuncy ejsuncy marked this pull request as ready for review April 7, 2026 17:27
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.

[Paid Media] spendInMicroCurrency and bidAmountMicro overflow 32-bit integer limit

1 participant