Skip to content

ref: Remove a subset of TODO(v9) instances #15033

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 4 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ targets:
# NPM Targets
## 1. Base Packages, node or browser SDKs depend on
## 1.1 Types
# TODO(v9): Remove
- name: npm
id: '@sentry/types'
includeNames: /^sentry-types-\d.*\.tgz$/
Expand Down
1 change: 0 additions & 1 deletion dev-packages/e2e-tests/verdaccio-config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ packages:
unpublish: $all
# proxy: npmjs # Don't proxy for E2E tests!

# TODO(v9): Remove
'@sentry/types':
access: $all
publish: $all
Expand Down
20 changes: 10 additions & 10 deletions dev-packages/node-integration-tests/test.txt

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions docs/migration/v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ Older Typescript versions _may_ still work, but we will not test them anymore an

- The `tracesSampler` hook will no longer be called for _every_ span. Instead, it will only be called for "root spans". Root spans are spans that have no local parent span. Root spans may however have incoming trace data from a different service, for example when using distributed tracing.

- The `childProcessIntegration`'s (previously `processThreadBreadcrumbIntegration`) `name` value has been changed from `"ProcessAndThreadBreadcrumbs"` to `"ChildProcess"`. This is relevant if you were filtering integrations by name.

### `@sentry/browser`

- The `captureUserFeedback` method has been removed. Use the `captureFeedback` method instead and update the `comments` field to `message`.
Expand All @@ -116,6 +118,8 @@ Older Typescript versions _may_ still work, but we will not test them anymore an

- By default, source maps will now be automatically deleted after being uploaded to Sentry for client-side builds. You can opt out of this behavior by explicitly setting `sourcemaps.deleteSourcemapsAfterUpload` to `false` in your Sentry config.

- The `sentry` property on the Next.js config object has officially been discontinued. Pass options to `withSentryConfig` directly.

### All Meta-Framework SDKs (`@sentry/astro`, `@sentry/nuxt`, `@sentry/solidstart`)

- Updated source map generation to respect the user-provided value of your build config, such as `vite.build.sourcemap`:
Expand Down
5 changes: 0 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@
"publishConfig": {
"access": "public"
},
"TODO(v9):": "Remove these dependencies",
"devDependencies": {
"@types/array.prototype.flat": "^1.2.1",
"array.prototype.flat": "^1.3.0"
},
"scripts": {
"build": "run-p build:transpile build:types",
"build:dev": "yarn build",
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/scope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export interface ScopeContext {
propagationContext: PropagationContext;
}

// TODO(v9): Add `normalizedRequest`
export interface SdkProcessingMetadata {
[key: string]: unknown;
requestSession?: {
Expand Down
3 changes: 0 additions & 3 deletions packages/core/src/utils/spanUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import { _getSpanForScope } from './spanOnScope';
export const TRACE_FLAG_NONE = 0x0;
export const TRACE_FLAG_SAMPLED = 0x1;

// todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`
let hasShownSpanDropWarning = false;

/**
Expand Down Expand Up @@ -281,8 +280,6 @@ export function getActiveSpan(): Span | undefined {

/**
* Logs a warning once if `beforeSendSpan` is used to drop spans.
*
* todo(v9): Remove this once we've stopped dropping spans via `beforeSendSpan`.
*/
export function showSpanDropWarning(): void {
if (!hasShownSpanDropWarning) {
Expand Down
9 changes: 0 additions & 9 deletions packages/nextjs/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,6 @@ export type SentryBuildOptions = {
*/
unstable_sentryWebpackPluginOptions?: SentryWebpackPluginOptions;

/**
* Use `hidden-source-map` for webpack `devtool` option, which strips the `sourceMappingURL` from the bottom of built
* JS files.
*
* @deprecated This is deprecated. The SDK emits chunks without `sourceMappingURL` for client bundles by default.
*/
// TODO(v9): Remove option
hideSourceMaps?: boolean;

/**
* Include Next.js-internal code and code from dependencies when uploading source maps.
*
Expand Down
11 changes: 0 additions & 11 deletions packages/nextjs/src/config/withSentryConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@ function getFinalConfigObject(
incomingUserNextConfigObject: NextConfigObject,
userSentryOptions: SentryBuildOptions,
): NextConfigObject {
// TODO(v9): Remove this check for the Sentry property
if ('sentry' in incomingUserNextConfigObject) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] Setting a `sentry` property on the Next.js config object as a means of configuration is no longer supported. Please use the `sentryBuildOptions` argument of of the `withSentryConfig()` function instead.',
);

// Next 12.2.3+ warns about non-canonical properties on `userNextConfig`.
delete incomingUserNextConfigObject.sentry;
}

if (userSentryOptions?.tunnelRoute) {
if (incomingUserNextConfigObject.output === 'export') {
if (!showedExportModeTunnelWarning) {
Expand Down
5 changes: 1 addition & 4 deletions packages/node/src/integrations/childProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ interface Options {
includeChildProcessArgs?: boolean;
}

// TODO(v9): Update this name and mention in migration docs.
const INTEGRATION_NAME = 'ProcessAndThreadBreadcrumbs';
const INTEGRATION_NAME = 'ChildProcess';

/**
* Capture breadcrumbs for child processes and worker threads.
Expand All @@ -22,14 +21,12 @@ export const childProcessIntegration = defineIntegration((options: Options = {})
return {
name: INTEGRATION_NAME,
setup(_client) {
// eslint-disable-next-line deprecation/deprecation
diagnosticsChannel.channel('child_process').subscribe((event: unknown) => {
if (event && typeof event === 'object' && 'process' in event) {
captureChildProcessEvents(event.process as ChildProcess, options);
}
});

// eslint-disable-next-line deprecation/deprecation
diagnosticsChannel.channel('worker_threads').subscribe((event: unknown) => {
if (event && typeof event === 'object' && 'worker' in event) {
captureWorkerThreadEvents(event.worker as Worker);
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/transports/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function makeNodeTransport(options: NodeTransportOptions): Transport {
const nativeHttpModule = isHttps ? https : http;
const keepAlive = options.keepAlive === undefined ? false : options.keepAlive;

// TODO(v9): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node
// TODO(v10): Evaluate if we can set keepAlive to true. This would involve testing for memory leaks in older node
// versions(>= 8) as they had memory leaks when using it: #2555
const agent = proxy
? (new HttpsProxyAgent(proxy) as http.Agent)
Expand Down
12 changes: 1 addition & 11 deletions packages/nuxt/src/client/vueIntegration.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
import { GLOBAL_OBJ, defineIntegration } from '@sentry/core';
import type { VueIntegrationOptions } from '@sentry/vue';

type Options = Omit<
VueIntegrationOptions,
| 'app'
| 'Vue'
// TODO(v9): Should be removed from parent type so we can remove it here
| 'hooks'
// TODO(v9): Should be removed from parent type so we can remove it here
| 'timeout'
// TODO(v9): Should be removed from parent type so we can remove it here
| 'trackComponents'
>;
type Options = Omit<VueIntegrationOptions, 'app' | 'Vue'>;

// Since the options object needs to cross the boundary between some builds (i.e. the nuxt module build and our client
// SDK build) we cannot use a getter that is exported from here. Instead we'll pass the options object through a global
Expand Down
Loading