Skip to content

Commit 5eae960

Browse files
committed
feat(core)!: Remove hasTracingEnabled
`hasTracingEnabled` was deprecated in v9, use `hasSpansEnabled` as a direct replacement.
1 parent 148e5c9 commit 5eae960

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

MIGRATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Updates and fixes for version 9 will be published as `SentryNodeServerlessSDKv9`
4040
### `@sentry/core` / All SDKs
4141

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

4445
## No Version Support Timeline
4546

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)