Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cloudflare): Add console integration #16021

Closed
wants to merge 1 commit into from

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Apr 9, 2025

resolves #15439

resolves https://linear.app/getsentry/issue/JSC-192

Add console integration to cloudflare SDK. Unfortunately can't access Node.js APIs, so we have to use safeJoin over util.format from node:util when creating the console message.

@AbhiPrasad AbhiPrasad requested a review from a team April 9, 2025 16:09
@AbhiPrasad AbhiPrasad self-assigned this Apr 9, 2025
@AbhiPrasad AbhiPrasad requested review from stephanie-anderson, andreiborza and Lms24 and removed request for a team April 9, 2025 16:09
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Is there an easy way to add a test or two? Would probably be good to have this covered. If it's too much of a hassle ignore me :D

@AbhiPrasad
Copy link
Member Author

Good call on tests! It also inspired me to approach this in a slightly different fashion.

Let me try another approach.

@AbhiPrasad
Copy link
Member Author

Superceded by #16024

@AbhiPrasad AbhiPrasad closed this Apr 10, 2025
AbhiPrasad added a commit that referenced this pull request Apr 10, 2025
…vercel-edge (#16024)

resolves #15439
resolves #4532

resolves https://linear.app/getsentry/issue/JSC-192

Supercedes #16021

Our console instrumentation was always inconsistent, but adding
breadcrumbs should not really be. This PR adds a unified console
instrumentation to `@sentry/core`, and makes the Node SDK use that. We
also add this to the `vercel-edge` and `cloudflare` SDKs.

I also left todo comments in the deno and browser SDKs for us to unify
into this single integration afterwards.

---------

Co-authored-by: Francesco Gringl-Novy <francesco.novy@sentry.io>
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.

[Feature Request] Add Console integration to @sentry/cloudflare
2 participants