Skip to content

Commit dda0fb3

Browse files
committed
Removed enableTracing getsentry/sentry-javascript#15078
1 parent f0a7919 commit dda0fb3

File tree

8 files changed

+7
-13
lines changed

8 files changed

+7
-13
lines changed

packages/core/src/js/integrations/default.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,7 @@ export function getDefaultIntegrations(options: ReactNativeClientOptions): Integ
9191
// hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present
9292
// that's different from prev imp here and might lead misconfiguration
9393
// `tracesSampleRate: undefined` should not enable tracing
94-
const hasTracingEnabled =
95-
options.enableTracing ||
96-
typeof options.tracesSampleRate === 'number' ||
97-
typeof options.tracesSampler === 'function';
94+
const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';
9895
if (hasTracingEnabled && options.enableAppStartTracking) {
9996
integrations.push(appStartIntegration());
10097
}

packages/core/test/feedback.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ describe('captureFeedback', () => {
297297
getDefaultTestClientOptions({
298298
dsn: 'https://[email protected]/1',
299299
enableSend: true,
300-
enableTracing: true,
300+
tracesSampleRate: 1.0,
301301
// We don't care about transactions here...
302302
beforeSendTransaction() {
303303
return null;
@@ -360,7 +360,7 @@ describe('captureFeedback', () => {
360360
getDefaultTestClientOptions({
361361
dsn: 'https://[email protected]/1',
362362
enableSend: true,
363-
enableTracing: true,
363+
tracesSampleRate: 1.0,
364364
// We don't care about transactions here...
365365
beforeSendTransaction() {
366366
return null;

packages/core/test/profiling/integration.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function initTestClient(
343343
const transportSendMock = jest.fn<ReturnType<Transport['send']>, Parameters<Transport['send']>>();
344344
const options: Sentry.ReactNativeOptions = {
345345
dsn: MOCK_DSN,
346-
enableTracing: true,
346+
tracesSampleRate: 1.0,
347347
enableNativeFramesTracking: false,
348348
profilesSampleRate: 1,
349349
integrations: integrations => {

packages/core/test/trace.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ describe('parentSpanIsAlwaysRootSpan', () => {
77

88
it('creates a span as child of root span if parentSpanIsAlwaysRootSpan=true', () => {
99
const options = getDefaultTestClientOptions({
10-
tracesSampleRate: 1,
10+
tracesSampleRate: 1.0,
1111
parentSpanIsAlwaysRootSpan: true,
1212
});
1313
client = new TestClient(options);
@@ -27,7 +27,7 @@ describe('parentSpanIsAlwaysRootSpan', () => {
2727

2828
it('does not creates a span as child of root span if parentSpanIsAlwaysRootSpan=false', () => {
2929
const options = getDefaultTestClientOptions({
30-
tracesSampleRate: 1,
30+
tracesSampleRate: 1.0,
3131
parentSpanIsAlwaysRootSpan: false,
3232
});
3333
client = new TestClient(options);

packages/core/test/tracing/reactnavigation.ttid.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ function initSentry(sut: ReturnType<typeof Sentry.reactNavigationIntegration>):
614614
const transportSendMock = jest.fn<ReturnType<Transport['send']>, Parameters<Transport['send']>>();
615615
const options: Sentry.ReactNativeOptions = {
616616
dsn: MOCK_DSN,
617-
enableTracing: true,
617+
tracesSampleRate: 1.0,
618618
enableStallTracking: false,
619619
integrations: [
620620
sut,

samples/expo/app/_layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ Sentry.init({
6767
// For testing, session close when 5 seconds (instead of the default 30) in the background.
6868
sessionTrackingIntervalMillis: 5000,
6969
// This will capture ALL TRACES and likely use up all your quota
70-
enableTracing: true,
7170
tracesSampleRate: 1.0,
7271
tracePropagationTargets: ['localhost', /^\//, /^https:\/\//, /^http:\/\//],
7372
attachStacktrace: true,

samples/react-native-macos/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ Sentry.init({
9595
// For testing, session close when 5 seconds (instead of the default 30) in the background.
9696
sessionTrackingIntervalMillis: 30000,
9797
// This will capture ALL TRACES and likely use up all your quota
98-
enableTracing: true,
9998
tracesSampleRate: 1.0,
10099
tracePropagationTargets: ['localhost', /^\//, /^https:\/\//, /^http:\/\//],
101100
attachStacktrace: true,

samples/react-native/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ Sentry.init({
110110
// For testing, session close when 5 seconds (instead of the default 30) in the background.
111111
sessionTrackingIntervalMillis: 30000,
112112
// This will capture ALL TRACES and likely use up all your quota
113-
enableTracing: true,
114113
tracesSampleRate: 1.0,
115114
tracePropagationTargets: ['localhost', /^\//, /^https:\/\//, /^http:\/\//],
116115
attachStacktrace: true,

0 commit comments

Comments
 (0)