-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(v8/serverless): Remove deprecated exports #10540
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
import type * as common from '@google-cloud/common'; | ||
import { | ||
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, | ||
convertIntegrationFnToClass, | ||
defineIntegration, | ||
getClient, | ||
} from '@sentry/core'; | ||
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, defineIntegration, getClient } from '@sentry/core'; | ||
import { startInactiveSpan } from '@sentry/node'; | ||
import type { Client, Integration, IntegrationClass, IntegrationFn } from '@sentry/types'; | ||
import type { Client, IntegrationFn } from '@sentry/types'; | ||
import { fill } from '@sentry/utils'; | ||
|
||
type RequestOptions = common.DecorateRequestOptions; | ||
|
@@ -41,21 +36,10 @@ const _googleCloudHttpIntegration = ((options: { optional?: boolean } = {}) => { | |
}; | ||
}) satisfies IntegrationFn; | ||
|
||
export const googleCloudHttpIntegration = defineIntegration(_googleCloudHttpIntegration); | ||
|
||
/** | ||
* Google Cloud Platform service requests tracking for RESTful APIs. | ||
* | ||
* @deprecated Use `googleCloudHttpIntegration()` instead. | ||
*/ | ||
// eslint-disable-next-line deprecation/deprecation | ||
export const GoogleCloudHttp = convertIntegrationFnToClass( | ||
INTEGRATION_NAME, | ||
googleCloudHttpIntegration, | ||
) as IntegrationClass<Integration>; | ||
|
||
// eslint-disable-next-line deprecation/deprecation | ||
export type GoogleCloudHttp = typeof GoogleCloudHttp; | ||
export const googleCloudHttpIntegration = defineIntegration(_googleCloudHttpIntegration); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. l: I guess we could inline the integration here now? Same for the others. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The main reason to keep this separated (initially) is that I though we may want to export the "unwrapped" version for tests, where we could then use the type safe form - but this is a nice to have, no strong feelings on this! |
||
|
||
/** Returns a wrapped function that makes a request with tracing enabled */ | ||
function wrapRequestFunction(orig: RequestFunction): RequestFunction { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
/** This file is used as the entrypoint for the lambda layer bundle, and is not included in the npm package. */ | ||
|
||
// https://medium.com/unsplash/named-namespace-imports-7345212bbffb | ||
import * as AWSLambda from './awslambda'; | ||
export { AWSLambda }; | ||
import { init as awsLambdaInit, tryPatchHandler, wrapHandler } from './awslambda'; | ||
|
||
export const AWSLambda = { | ||
init: awsLambdaInit, | ||
wrapHandler, | ||
tryPatchHandler, | ||
}; | ||
|
||
export * from './awsservices'; | ||
export * from '@sentry/node'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include this in the migration docs somehow? 🤔