Skip to content

Commit b5b0b32

Browse files
authored
feat(core)!: Remove hasTracingEnabled (#17072)
`hasTracingEnabled` was deprecated in v9, use `hasSpansEnabled` as a direct replacement.
1 parent 904932f commit b5b0b32

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

MIGRATION.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ These docs walk through how to migrate our JavaScript SDKs through different maj
66
- Upgrading from [SDK 6.x to 7.x](./docs/migration/v6-to-v7.md)
77
- Upgrading from [SDK 7.x to 8.x](./docs/migration/v7-to-v8.md)
88
- Upgrading from [SDK 8.x to 9.x](./docs/migration/v8-to-v9.md)
9-
- Upgrading from [SDK 9.x to 10.x](#upgrading-from-9x-to-10x)
9+
<<<<<<< HEAD
10+
- # Upgrading from [SDK 9.x to 10.x](#upgrading-from-9x-to-10x)
11+
- Upgrading from [SDK 9.x to 10.x](#upgrading-from-8x-to-9x)
12+
> > > > > > > f726d5ab5 (chore: Add migration guide for v10 and move v8->v9 guide to docs)
1013
1114
# Upgrading from 9.x to 10.x
1215

@@ -37,6 +40,7 @@ Updates and fixes for version 9 will be published as `SentryNodeServerlessSDKv9`
3740
### `@sentry/core` / All SDKs
3841

3942
- `BaseClient` was removed, use `Client` as a direct replacement.
43+
- `hasTracingEnabled` was removed, use `hasSpansEnabled` as a direct replacement.
4044

4145
## No Version Support Timeline
4246

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ export { getIntegrationsToSetup, addIntegration, defineIntegration } from './int
5959
export { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent';
6060
export { prepareEvent } from './utils/prepareEvent';
6161
export { createCheckInEnvelope } from './checkin';
62-
// eslint-disable-next-line deprecation/deprecation
63-
export { hasTracingEnabled } from './utils/hasSpansEnabled';
6462
export { hasSpansEnabled } from './utils/hasSpansEnabled';
6563
export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
6664
export { handleCallbackErrors } from './utils/handleCallbackErrors';

packages/core/src/utils/hasSpansEnabled.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,3 @@ export function hasSpansEnabled(
3434
(options.tracesSampleRate != null || !!options.tracesSampler)
3535
);
3636
}
37-
38-
/**
39-
* @see JSDoc of `hasSpansEnabled`
40-
* @deprecated Use `hasSpansEnabled` instead, which is a more accurately named version of this function.
41-
* This function will be removed in the next major version of the SDK.
42-
*/
43-
// TODO(v10): Remove this export
44-
export const hasTracingEnabled = hasSpansEnabled;

packages/core/test/lib/utils/hasTracingEnabled.test.ts renamed to packages/core/test/lib/utils/hasSpansEnabled.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest';
2-
import { hasSpansEnabled, hasTracingEnabled } from '../../../src';
2+
import { hasSpansEnabled } from '../../../src';
33

44
describe('hasSpansEnabled', () => {
55
const tracesSampler = () => 1;
@@ -15,7 +15,5 @@ describe('hasSpansEnabled', () => {
1515
['With tracesSampler and tracesSampleRate', { tracesSampler, tracesSampleRate }, true],
1616
])('%s', (_: string, input: Parameters<typeof hasSpansEnabled>[0], output: ReturnType<typeof hasSpansEnabled>) => {
1717
expect(hasSpansEnabled(input)).toBe(output);
18-
// eslint-disable-next-line deprecation/deprecation
19-
expect(hasTracingEnabled(input)).toBe(output);
2018
});
2119
});

0 commit comments

Comments
 (0)