Skip to content

feat(core): Deprecate debugIntegration and sessionTimingIntegration #14363

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

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/migration/draft-v9-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
## `@sentry/core`

- Deprecated `transactionNamingScheme` option in `requestDataIntegration`.
- Deprecated `debugIntegration`. To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...).
- Deprecated `sessionTimingIntegration`. To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`).

## `@sentry/types`

Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@
"proseWrap": "always",
"singleQuote": true,
"trailingComma": "all",
"overrides": [{
"files": "CHANGELOG.md",
"options": {
"proseWrap": "preserve"
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "preserve"
}
}
}]
]
}
}
11 changes: 7 additions & 4 deletions packages/core/src/integrations/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ interface DebugOptions {
debugger?: boolean;
}

/**
* Integration to debug sent Sentry events.
* This integration should not be used in production.
*/
const _debugIntegration = ((options: DebugOptions = {}) => {
const _options = {
debugger: false,
Expand Down Expand Up @@ -51,4 +47,11 @@ const _debugIntegration = ((options: DebugOptions = {}) => {
};
}) satisfies IntegrationFn;

/**
* Integration to debug sent Sentry events.
* This integration should not be used in production.
*
* @deprecated This integration is deprecated and will be removed in the next major version of the SDK.
* To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...).
*/
export const debugIntegration = defineIntegration(_debugIntegration);
3 changes: 3 additions & 0 deletions packages/core/src/integrations/sessiontiming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,8 @@ const _sessionTimingIntegration = (() => {
/**
* This function adds duration since the sessionTimingIntegration was initialized
* till the time event was sent.
*
* @deprecated This integration is deprecated and will be removed in the next major version of the SDK.
* To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`).
*/
export const sessionTimingIntegration = defineIntegration(_sessionTimingIntegration);
Loading