Skip to content

Commit ef17d52

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

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Updates and fixes for version 9 will be published as `SentryNodeServerlessSDKv9`
3636

3737
### `@sentry/core` / All SDKs
3838

39-
- TODO: fill in removed APIs
39+
- `hasTracingEnabled` was removed, use `hasSpansEnabled` as a direct replacement.
4040

4141
## No Version Support Timeline
4242

packages/core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ export { getIntegrationsToSetup, addIntegration, defineIntegration } from './int
6363
export { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent';
6464
export { prepareEvent } from './utils/prepareEvent';
6565
export { createCheckInEnvelope } from './checkin';
66-
// eslint-disable-next-line deprecation/deprecation
67-
export { hasTracingEnabled } from './utils/hasSpansEnabled';
6866
export { hasSpansEnabled } from './utils/hasSpansEnabled';
6967
export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
7068
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)