Skip to content

Commit

Permalink
feat(serverless): Add missing @sentry/node re-exports (#10390)
Browse files Browse the repository at this point in the history
Adds missing re-exports to the serverless package
  • Loading branch information
Lms24 committed Jan 30, 2024
1 parent 18c0a4f commit 1fea339
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
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';

0 comments on commit 1fea339

Please sign in to comment.