Skip to content

feat(cloudflare): Split alarms into multiple traces and link them#19373

Draft
JPeer264 wants to merge 2 commits intodevelopfrom
jp/split-alarm
Draft

feat(cloudflare): Split alarms into multiple traces and link them#19373
JPeer264 wants to merge 2 commits intodevelopfrom
jp/split-alarm

Conversation

@JPeer264
Copy link
Member

@JPeer264 JPeer264 commented Feb 18, 2026

closes #19105
closes JS-1604

This actually splits up alarms into its own traces and binding them with span links.

The logic works as following. When setAlarm is getting called it will store the alarm inside the durable object. Once the alarm is being executed the previous trace link will be retrieved via ctx.storage.get and then set as span link. Using the durable object itself as storage between alarms is even used on Cloudflare's alarm page.

Also it is worth to mention that only 1 alarm at a time can happen, so it is safe to use a fixed key for the previous trace. I implemented the trace links, so they could be reused in the future for other methods as well, so they are not exclusively for alarms.

@JPeer264 JPeer264 self-assigned this Feb 18, 2026
@JPeer264 JPeer264 changed the title ref(cloudflare): Move internal files and functions around feat(cloudflare): Split alarms into multiple traces and link them Feb 18, 2026
@linear
Copy link

linear bot commented Feb 18, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

Codecov Results 📊


Generated by Codecov Action

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.56 kB added added
@sentry/browser - with treeshaking flags 24.08 kB added added
@sentry/browser (incl. Tracing) 42.36 kB added added
@sentry/browser (incl. Tracing, Profiling) 47.03 kB added added
@sentry/browser (incl. Tracing, Replay) 81.18 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 70.8 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 85.87 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 98.03 kB added added
@sentry/browser (incl. Feedback) 42.29 kB added added
@sentry/browser (incl. sendFeedback) 30.23 kB added added
@sentry/browser (incl. FeedbackAsync) 35.22 kB added added
@sentry/browser (incl. Metrics) 26.74 kB added added
@sentry/browser (incl. Logs) 26.88 kB added added
@sentry/browser (incl. Metrics & Logs) 27.56 kB added added
@sentry/react 27.33 kB added added
@sentry/react (incl. Tracing) 44.72 kB added added
@sentry/vue 30.01 kB added added
@sentry/vue (incl. Tracing) 44.22 kB added added
@sentry/svelte 25.58 kB added added
CDN Bundle 28.11 kB added added
CDN Bundle (incl. Tracing) 43.2 kB added added
CDN Bundle (incl. Logs, Metrics) 28.95 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 44.03 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 68.02 kB added added
CDN Bundle (incl. Tracing, Replay) 80.07 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 80.94 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 85.5 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 86.4 kB added added
CDN Bundle - uncompressed 82.22 kB added added
CDN Bundle (incl. Tracing) - uncompressed 127.93 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 85.05 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 130.76 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 208.71 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 244.81 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 247.63 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 257.61 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 260.42 kB added added
@sentry/nextjs (client) 47.07 kB added added
@sentry/sveltekit (client) 42.81 kB added added
@sentry/node-core 52.15 kB added added
@sentry/node 166.53 kB added added
@sentry/node - without tracing 93.65 kB added added
@sentry/aws-serverless 109.45 kB added added

Base automatically changed from jp/prepare-context-instrument to develop February 18, 2026 10:53
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.

Cloudflare alarm split in different traces

1 participant

Comments