Skip to content

feat(v8/vercel-edge): Remove vercel-edge sdk deprecations #10974

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
Mar 8, 2024
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
19 changes: 0 additions & 19 deletions packages/vercel-edge/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ export type { AddRequestDataToEventOptions } from '@sentry/utils';
export type { VercelEdgeOptions } from './types';

export {
// eslint-disable-next-line deprecation/deprecation
addGlobalEventProcessor,
addEventProcessor,
addBreadcrumb,
addIntegration,
Expand All @@ -32,22 +30,14 @@ export {
close,
createTransport,
flush,
// eslint-disable-next-line deprecation/deprecation
getActiveTransaction,
// eslint-disable-next-line deprecation/deprecation
getCurrentHub,
getClient,
isInitialized,
getCurrentScope,
getGlobalScope,
getIsolationScope,
Hub,
// eslint-disable-next-line deprecation/deprecation
makeMain,
setCurrentClient,
Scope,
// eslint-disable-next-line deprecation/deprecation
startTransaction,
SDK_VERSION,
setContext,
setExtra,
Expand Down Expand Up @@ -86,13 +76,4 @@ export {
init,
} from './sdk';

import { RequestData } from '@sentry/core';

import { WinterCGFetch } from './integrations/wintercg-fetch';
export { winterCGFetchIntegration } from './integrations/wintercg-fetch';

/** @deprecated Import the integration function directly, e.g. `inboundFiltersIntegration()` instead of `new Integrations.InboundFilter(). */
export const Integrations = {
WinterCGFetch,
RequestData,
};
26 changes: 2 additions & 24 deletions packages/vercel-edge/src/integrations/wintercg-fetch.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
import {
addBreadcrumb,
convertIntegrationFnToClass,
defineIntegration,
getClient,
instrumentFetchRequest,
isSentryRequestUrl,
} from '@sentry/core';
import { addBreadcrumb, defineIntegration, getClient, instrumentFetchRequest, isSentryRequestUrl } from '@sentry/core';
import type {
Client,
FetchBreadcrumbData,
FetchBreadcrumbHint,
HandlerDataFetch,
Integration,
IntegrationClass,
IntegrationFn,
Span,
} from '@sentry/types';
Expand Down Expand Up @@ -117,23 +108,10 @@ const _winterCGFetch = ((options: Partial<Options> = {}) => {
};
}) satisfies IntegrationFn;

export const winterCGFetchIntegration = defineIntegration(_winterCGFetch);

/**
* Creates spans and attaches tracing headers to fetch requests on WinterCG runtimes.
*
* @deprecated Use `winterCGFetchIntegration()` instead.
*/
// eslint-disable-next-line deprecation/deprecation
export const WinterCGFetch = convertIntegrationFnToClass(
INTEGRATION_NAME,
winterCGFetchIntegration,
) as IntegrationClass<Integration & { setupOnce: () => void }> & {
new (options?: Partial<Options>): Integration;
};

// eslint-disable-next-line deprecation/deprecation
export type WinterCGFetch = typeof WinterCGFetch;
export const winterCGFetchIntegration = defineIntegration(_winterCGFetch);

function createBreadcrumb(handlerData: HandlerDataFetch): void {
const { startTimestamp, endTimestamp } = handlerData;
Expand Down