Skip to content

feat(serverless): Add missing @sentry/node re-exports #10390

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 5 commits into from
Jan 30, 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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const NODE_EXPORTS_IGNORE = [
'default',
// Probably generated by transpilation, no need to require it
'__esModule',
// this function was deprecates almost immediately after it was introduced
// this function was deprecated almost immediately after it was introduced
// due to a name change (startSpan). No need to re-export it IMHO.
'startActiveSpan',
// this was never meant for external use (and documented as such)
Expand Down Expand Up @@ -60,18 +60,7 @@ const DEPENDENTS: Dependent[] = [
{
package: '@sentry/serverless',
exports: Object.keys(SentryServerless),
ignoreExports: [
// Deprecated, no need to add this now to serverless
'extractTraceparentData',
'getModuleFromFilename',
'enableAnrDetection',
// TODO: Should these be exported from serverless?
'cron',
'runWithAsyncContext',
'hapiErrorPlugin',
],
// TODO: Fix exports in serverless
skip: true,
ignoreExports: ['cron', 'hapiErrorPlugin', 'enableAnrDetection'],
},
{
package: '@sentry/sveltekit',
Expand Down
14 changes: 14 additions & 0 deletions packages/serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ export {
getIsolationScope,
getHubFromCarrier,
// eslint-disable-next-line deprecation/deprecation
spanStatusfromHttpCode,
getSpanStatusFromHttpCode,
// eslint-disable-next-line deprecation/deprecation
makeMain,
setCurrentClient,
setContext,
Expand Down Expand Up @@ -79,4 +82,15 @@ export {
startSpanManual,
continueTrace,
parameterize,
requestDataIntegration,
linkedErrorsIntegration,
inboundFiltersIntegration,
functionToStringIntegration,
// eslint-disable-next-line deprecation/deprecation
getModuleFromFilename,
createGetModuleFromFilename,
metrics,
// eslint-disable-next-line deprecation/deprecation
extractTraceparentData,
runWithAsyncContext,
} from '@sentry/node';