Skip to content

feat(core)!: Remove hasTracingEnabled #17072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ These docs walk through how to migrate our JavaScript SDKs through different maj
- Upgrading from [SDK 6.x to 7.x](./docs/migration/v6-to-v7.md)
- Upgrading from [SDK 7.x to 8.x](./docs/migration/v7-to-v8.md)
- Upgrading from [SDK 8.x to 9.x](./docs/migration/v8-to-v9.md)
- Upgrading from [SDK 9.x to 10.x](#upgrading-from-9x-to-10x)
<<<<<<< HEAD
- # Upgrading from [SDK 9.x to 10.x](#upgrading-from-9x-to-10x)
- Upgrading from [SDK 9.x to 10.x](#upgrading-from-8x-to-9x)
> > > > > > > f726d5ab5 (chore: Add migration guide for v10 and move v8->v9 guide to docs)

# Upgrading from 9.x to 10.x

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

- `BaseClient` was removed, use `Client` as a direct replacement.
- `hasTracingEnabled` was removed, use `hasSpansEnabled` as a direct replacement.

## No Version Support Timeline

Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ export { getIntegrationsToSetup, addIntegration, defineIntegration } from './int
export { applyScopeDataToEvent, mergeScopeData } from './utils/applyScopeDataToEvent';
export { prepareEvent } from './utils/prepareEvent';
export { createCheckInEnvelope } from './checkin';
// eslint-disable-next-line deprecation/deprecation
export { hasTracingEnabled } from './utils/hasSpansEnabled';
export { hasSpansEnabled } from './utils/hasSpansEnabled';
export { isSentryRequestUrl } from './utils/isSentryRequestUrl';
export { handleCallbackErrors } from './utils/handleCallbackErrors';
Expand Down
8 changes: 0 additions & 8 deletions packages/core/src/utils/hasSpansEnabled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,3 @@ export function hasSpansEnabled(
(options.tracesSampleRate != null || !!options.tracesSampler)
);
}

/**
* @see JSDoc of `hasSpansEnabled`
* @deprecated Use `hasSpansEnabled` instead, which is a more accurately named version of this function.
* This function will be removed in the next major version of the SDK.
*/
// TODO(v10): Remove this export
export const hasTracingEnabled = hasSpansEnabled;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
import { hasSpansEnabled, hasTracingEnabled } from '../../../src';
import { hasSpansEnabled } from '../../../src';

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