You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cloudflare Workflows - sentry requires UUID but that removes a benefit of workflows #17074
Sentry requires the workflow instance ID to be a random UUID. But part of the point of using Workflows is that if we receive duplicate webhooks, we don't double-write. So in the case of Stripe, for instance, we want to use the Stripe event ID as the workflow instance ID.
Solution Brainstorm
We can probably turn the stripe event ID into a UUID in a deterministic and non-colliding way, but then our workflows are no longer easy to trace back to the stripe event that caused them (or searchable in the CF dashboard, etc)
Ideally we could use Stripe's event ID to set the already unique-requierd workflow ID rather than needing to convert it to a UUID for Sentry.
Hello, one solution that would work for you here is creating a UUID out of the event ID (as you already mentioned) with, for example, createHash. As this is only one-way, you could additionally store the event ID along with the event as a tag inside your workflow to trace it back to the event again.
withScope(asyncscope=>{scope.setTag('workflow.original_instance_id',eventID);scope.setTag('stripe.event_id',eventID);// If it's always Stripe})
Thanks for the tag suggestion, that is helpful. My main area to solve is actually in the Cloudflare dashboard though, where I'd like to find workflows by their stripe event.
Instead, because we have to use UUIDs, the listings in the CF Dashboard lose meaning.
So it's more of a UX/DX thing, we have this UUID hashing shipped to prod and it's working. It was just a surprise when we shipped it at first and got errors requiring UUID, and then lost the meaningful rows in CF dashboard.
Side note, I originally posted this in the discord, here and Abhi asked me to open a GH issue for shared comms.
If the instance ID doesn't match a uuid we could hash it and truncate to the same length as a uuid. It would be deterministic so we'd get the same uuid every time.
We don't need the hash to be cryptographically secure, just uniformly distributed so SHA-1 would suffice and its fastest.
Activity
linear commentedon Jul 17, 2025
JS-749 Cloudflare Workflows - sentry requires UUID but that removes a benefit of workflows
s1gr1d commentedon Jul 18, 2025
Hello, one solution that would work for you here is creating a UUID out of the event ID (as you already mentioned) with, for example,
createHash. As this is only one-way, you could additionally store the event ID along with the event as a tag inside your workflow to trace it back to the event again.StephenHaney commentedon Jul 18, 2025
Thanks for the tag suggestion, that is helpful. My main area to solve is actually in the Cloudflare dashboard though, where I'd like to find workflows by their stripe event.
Instead, because we have to use UUIDs, the listings in the CF Dashboard lose meaning.

So it's more of a UX/DX thing, we have this UUID hashing shipped to prod and it's working. It was just a surprise when we shipped it at first and got errors requiring UUID, and then lost the meaningful rows in CF dashboard.
Side note, I originally posted this in the discord, here and Abhi asked me to open a GH issue for shared comms.
timfish commentedon Jul 21, 2025
If the instance ID doesn't match a uuid we could hash it and truncate to the same length as a uuid. It would be deterministic so we'd get the same uuid every time.
We don't need the hash to be cryptographically secure, just uniformly distributed so SHA-1 would suffice and its fastest.
fix(cloudflare): Allow non uuid workflow instance IDs (#17121)
StephenHaney commentedon Jul 23, 2025
Really appreciate you all fixing this so quickly for a quality of life thing! Makes me feel good about our choice to use Sentry 🙌
fix(v9/cloudflare) Allow non UUID workflow instance IDs (#17135)
AbhiPrasad commentedon Jul 24, 2025
released with https://github.com/getsentry/sentry-javascript/releases/tag/9.41.0
github-actions commentedon Jul 31, 2025
A PR closing this issue has just been released 🚀
This issue was referenced by PR #17121, which was included in the 10.0.0 release.