-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat: Enable consoleLoggingIntegration
by default in node, bun, cloudflare, and vercel-edge sdks
#17747
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
base: develop
Are you sure you want to change the base?
feat: Enable consoleLoggingIntegration
by default in node, bun, cloudflare, and vercel-edge sdks
#17747
Changes from all commits
42735d0
dd7dc8d
19c7f9b
cda5b4c
c567c3c
8eb0ade
941b693
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import type { Integration } from '@sentry/core'; | ||
import { | ||
consoleIntegration, | ||
consoleLoggingIntegration, | ||
dedupeIntegration, | ||
functionToStringIntegration, | ||
getIntegrationsToSetup, | ||
|
@@ -22,10 +23,7 @@ import { defaultStackParser } from './vendor/stacktrace'; | |
/** Get the default integrations for the Cloudflare SDK. */ | ||
export function getDefaultIntegrations(options: CloudflareOptions): Integration[] { | ||
const sendDefaultPii = options.sendDefaultPii ?? false; | ||
return [ | ||
// The Dedupe integration should not be used in workflows because we want to | ||
// capture all step failures, even if they are the same error. | ||
...(options.enableDedupe === false ? [] : [dedupeIntegration()]), | ||
const integrations = [ | ||
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration` | ||
// eslint-disable-next-line deprecation/deprecation | ||
inboundFiltersIntegration(), | ||
|
@@ -37,6 +35,19 @@ export function getDefaultIntegrations(options: CloudflareOptions): Integration[ | |
requestDataIntegration(sendDefaultPii ? undefined : { include: { cookies: false } }), | ||
consoleIntegration(), | ||
]; | ||
|
||
// The Dedupe integration should not be used in workflows because we want to | ||
// capture all step failures, even if they are the same error. | ||
if (options.enableDedupe) { | ||
integrations.push(dedupeIntegration()); | ||
} | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if (options.enableLogs) { | ||
// TODO(v11): Remove this once we add logs to the `consoleIntegration`. | ||
integrations.push(consoleLoggingIntegration()); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: Integration Defaults Changed, Breaking BehaviorThe |
||
|
||
return integrations; | ||
} | ||
|
||
/** | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no action required: Not sure if it makes sense to unify consoleIntegration and consoleLoggingIntegration. Probably depends on our plan for breadcrumbs going forward but I kinda like smaller single-purpose integrations over larger ones.