Skip to content

Commit d0da58c

Browse files
c298leeandrewshie-sentry
authored andcommitted
chore: bump Sentry SDK to v9 alpha (#84258)
Related PRs for updating some deprecations: - #84130 - #84132 - #84196 - #84254 PR for updating getsentry: getsentry/getsentry#16292
1 parent fba1893 commit d0da58c

File tree

7 files changed

+291
-292
lines changed

7 files changed

+291
-292
lines changed

build-utils/sentry-instrumentation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class SentryInstrumentation {
4949
environment: IS_CI ? 'ci' : 'local',
5050
tracesSampleRate: 1.0,
5151
integrations: [nodeProfilingIntegration()],
52-
profilesSampler: ({transactionContext}) => {
53-
if (transactionContext.name === INCREMENTAL_BUILD_TXN) {
52+
profilesSampler: samplingContext => {
53+
if (samplingContext.name === INCREMENTAL_BUILD_TXN) {
5454
return 0;
5555
}
5656
return 1;

package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@
5454
"@sentry-internal/rrweb": "2.26.0",
5555
"@sentry-internal/rrweb-player": "2.26.0",
5656
"@sentry-internal/rrweb-snapshot": "2.26.0",
57-
"@sentry/core": "8.48.0",
58-
"@sentry/node": "8.48.0",
59-
"@sentry/react": "8.48.0",
57+
"@sentry/core": "9.0.0-alpha.1",
58+
"@sentry/node": "9.0.0-alpha.1",
59+
"@sentry/react": "9.0.0-alpha.1",
6060
"@sentry/release-parser": "^1.3.1",
6161
"@sentry/status-page-list": "^0.6.0",
62-
"@sentry/types": "8.48.0",
63-
"@sentry/utils": "8.48.0",
6462
"@sentry/webpack-plugin": "^3.1.1",
6563
"@spotlightjs/spotlight": "^2.0.0-alpha.1",
6664
"@tanstack/react-query": "^5.64.1",
@@ -180,7 +178,7 @@
180178
"@eslint/js": "^9.17.0",
181179
"@pmmmwh/react-refresh-webpack-plugin": "0.5.15",
182180
"@sentry/jest-environment": "6.0.0",
183-
"@sentry/profiling-node": "8.48.0",
181+
"@sentry/profiling-node": "9.0.0-alpha.1",
184182
"@styled/typescript-styled-plugin": "^1.0.1",
185183
"@testing-library/dom": "10.1.0",
186184
"@testing-library/jest-dom": "6.4.5",

static/app/main.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import {useState} from 'react';
22
import {createBrowserRouter, RouterProvider} from 'react-router-dom';
3-
import {wrapCreateBrowserRouter} from '@sentry/react';
3+
import {wrapCreateBrowserRouterV6} from '@sentry/react';
44
import {ReactQueryDevtools} from '@tanstack/react-query-devtools';
55

66
import DemoHeader from 'sentry/components/demo/demoHeader';
@@ -20,7 +20,7 @@ import {buildReactRouter6Routes} from './utils/reactRouter6Compat/router';
2020
const queryClient = new QueryClient(DEFAULT_QUERY_CLIENT_CONFIG);
2121

2222
function buildRouter() {
23-
const sentryCreateBrowserRouter = wrapCreateBrowserRouter(createBrowserRouter);
23+
const sentryCreateBrowserRouter = wrapCreateBrowserRouterV6(createBrowserRouter);
2424
const router = sentryCreateBrowserRouter(buildReactRouter6Routes(routes()));
2525
DANGEROUS_SET_REACT_ROUTER_6_HISTORY(router);
2626

static/app/utils/performanceForSentry/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type {ProfilerOnRenderCallback, ReactNode} from 'react';
22
import {Fragment, Profiler, useEffect, useRef} from 'react';
33
import type {MeasurementUnit, Span, TransactionEvent} from '@sentry/core';
4+
import {browserPerformanceTimeOrigin, timestampInSeconds} from '@sentry/core';
45
import * as Sentry from '@sentry/react';
5-
import {browserPerformanceTimeOrigin, timestampInSeconds} from '@sentry/utils';
66

77
import {useLocation} from 'sentry/utils/useLocation';
88
import usePrevious from 'sentry/utils/usePrevious';
@@ -333,7 +333,8 @@ const addAssetMeasurements = (transaction: TransactionEvent) => {
333333
};
334334

335335
const addCustomMeasurements = (transaction: TransactionEvent) => {
336-
if (!browserPerformanceTimeOrigin || !transaction.start_timestamp) {
336+
const browserTimeOrigin = browserPerformanceTimeOrigin();
337+
if (!browserTimeOrigin || !transaction.start_timestamp) {
337338
return;
338339
}
339340

@@ -348,7 +349,7 @@ const addCustomMeasurements = (transaction: TransactionEvent) => {
348349
const context: MeasurementContext = {
349350
transaction,
350351
ttfb: ttfbValue,
351-
browserTimeOrigin: browserPerformanceTimeOrigin,
352+
browserTimeOrigin,
352353
transactionStart: transaction.start_timestamp,
353354
transactionOp: (transaction.contexts?.trace?.op as string) ?? 'pageload',
354355
};

tests/js/fixtures/team.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {uuid4} from '@sentry/utils';
1+
import {uuid4} from '@sentry/core';
22

33
import type {DetailedTeam} from 'sentry/types/organization';
44

tests/js/instrumentedEnv/userEventIntegration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import {fill, isThenable, loadModule} from '@sentry/core';
12
import * as Sentry from '@sentry/react';
2-
import {fill, isThenable, loadModule} from '@sentry/utils';
33

44
export function instrumentUserEvent(): void {
55
const pkg = loadModule<any>('@testing-library/user-event');

0 commit comments

Comments
 (0)