@sentry/serverless
Advanced tools
Comparing version 7.105.0 to 8.0.0-alpha.2
@@ -11,3 +11,3 @@ var { | ||
const util = require('util'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils = require('@sentry/utils'); | ||
@@ -24,12 +24,5 @@ const perf_hooks = require('perf_hooks'); | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
const defaultIntegrations = [ | ||
// eslint-disable-next-line deprecation/deprecation | ||
...node.defaultIntegrations, | ||
awsservices.awsServicesIntegration({ optional: true }), | ||
]; | ||
/** Get the default integrations for the AWSLambda SDK. */ | ||
function getDefaultIntegrations(options) { | ||
return [...node.getDefaultIntegrations(options), awsservices.awsServicesIntegration({ optional: true })]; | ||
return [...nodeExperimental.getDefaultIntegrations(options), awsservices.awsServicesIntegration({ optional: true })]; | ||
} | ||
@@ -55,9 +48,9 @@ | ||
name: 'npm:@sentry/serverless', | ||
version: node.SDK_VERSION, | ||
version: nodeExperimental.SDK_VERSION, | ||
}, | ||
], | ||
version: node.SDK_VERSION, | ||
version: nodeExperimental.SDK_VERSION, | ||
}; | ||
node.init(opts); | ||
nodeExperimental.init(opts); | ||
} | ||
@@ -254,5 +247,5 @@ | ||
timeoutWarningTimer = setTimeout(() => { | ||
node.withScope(scope => { | ||
nodeExperimental.withScope(scope => { | ||
scope.setTag('timeout', humanReadableTimeout); | ||
node.captureMessage(`Possible function timeout: ${context.functionName}`, 'warning'); | ||
nodeExperimental.captureMessage(`Possible function timeout: ${context.functionName}`, 'warning'); | ||
}); | ||
@@ -263,3 +256,3 @@ }, timeoutWarningDelay) ; | ||
async function processResult(span) { | ||
const scope = node.getCurrentScope(); | ||
const scope = nodeExperimental.getCurrentScope(); | ||
@@ -276,7 +269,7 @@ let rv; | ||
reasons.forEach(exception => { | ||
node.captureException(exception, scope => utils$1.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(exception, scope => utils$1.markEventUnhandled(scope)); | ||
}); | ||
} | ||
} catch (e) { | ||
node.captureException(e, scope => utils$1.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(e, scope => utils$1.markEventUnhandled(scope)); | ||
throw e; | ||
@@ -286,3 +279,3 @@ } finally { | ||
_optionalChain([span, 'optionalAccess', _ => _.end, 'call', _2 => _2()]); | ||
await node.flush(options.flushTimeout).catch(e => { | ||
await nodeExperimental.flush(options.flushTimeout).catch(e => { | ||
debugBuild.DEBUG_BUILD && utils.logger.error(e); | ||
@@ -303,4 +296,4 @@ }); | ||
return node.continueTrace({ sentryTrace, baggage }, () => { | ||
return node.startSpanManual( | ||
return nodeExperimental.continueTrace({ sentryTrace, baggage }, () => { | ||
return nodeExperimental.startSpanManual( | ||
{ | ||
@@ -315,3 +308,3 @@ name: context.functionName, | ||
span => { | ||
enhanceScopeWithTransactionData(node.getCurrentScope(), context); | ||
enhanceScopeWithTransactionData(nodeExperimental.getCurrentScope(), context); | ||
@@ -324,3 +317,3 @@ return processResult(span); | ||
return node.withScope(async () => { | ||
return nodeExperimental.withScope(async () => { | ||
return processResult(undefined); | ||
@@ -331,3 +324,2 @@ }); | ||
exports.defaultIntegrations = defaultIntegrations; | ||
exports.getDefaultIntegrations = getDefaultIntegrations; | ||
@@ -337,5 +329,5 @@ exports.init = init; | ||
exports.wrapHandler = wrapHandler; | ||
for (const k in node) { | ||
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = node[k]; | ||
for (const k in nodeExperimental) { | ||
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = nodeExperimental[k]; | ||
} | ||
//# sourceMappingURL=awslambda.js.map |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const core = require('@sentry/core'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils = require('@sentry/utils'); | ||
@@ -57,5 +57,5 @@ | ||
if (SETUP_CLIENTS.has(node.getClient() )) { | ||
if (SETUP_CLIENTS.has(nodeExperimental.getClient() )) { | ||
req.on('afterBuild', () => { | ||
span = node.startInactiveSpan({ | ||
span = nodeExperimental.startInactiveSpan({ | ||
name: describe(this, operation, params), | ||
@@ -62,0 +62,0 @@ onlyIfParent: true, |
@@ -8,3 +8,3 @@ var { | ||
const core = require('@sentry/core'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils$1 = require('@sentry/utils'); | ||
@@ -37,3 +37,3 @@ const debugBuild = require('../debug-build.js'); | ||
return (context, callback) => { | ||
return node.startSpanManual( | ||
return nodeExperimental.startSpanManual( | ||
{ | ||
@@ -48,3 +48,3 @@ name: context.type || '<unknown>', | ||
span => { | ||
const scope = node.getCurrentScope(); | ||
const scope = nodeExperimental.getCurrentScope(); | ||
scope.setContext('gcp.function.context', { ...context }); | ||
@@ -54,3 +54,3 @@ | ||
if (args[0] !== null && args[0] !== undefined) { | ||
node.captureException(args[0], scope => utils.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(args[0], scope => utils.markEventUnhandled(scope)); | ||
} | ||
@@ -60,3 +60,3 @@ _optionalChain([span, 'optionalAccess', _ => _.end, 'call', _2 => _2()]); | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
node.flush(options.flushTimeout) | ||
nodeExperimental.flush(options.flushTimeout) | ||
.then(null, e => { | ||
@@ -74,3 +74,3 @@ debugBuild.DEBUG_BUILD && utils$1.logger.error(e); | ||
err => { | ||
node.captureException(err, scope => utils.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(err, scope => utils.markEventUnhandled(scope)); | ||
}, | ||
@@ -77,0 +77,0 @@ ); |
@@ -8,3 +8,3 @@ var { | ||
const core = require('@sentry/core'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils$1 = require('@sentry/utils'); | ||
@@ -40,3 +40,3 @@ const debugBuild = require('../debug-build.js'); | ||
return node.startSpanManual( | ||
return nodeExperimental.startSpanManual( | ||
{ | ||
@@ -51,3 +51,3 @@ name: context.eventType, | ||
span => { | ||
const scope = node.getCurrentScope(); | ||
const scope = nodeExperimental.getCurrentScope(); | ||
scope.setContext('gcp.function.context', { ...context }); | ||
@@ -57,3 +57,3 @@ | ||
if (args[0] !== null && args[0] !== undefined) { | ||
node.captureException(args[0], scope => utils.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(args[0], scope => utils.markEventUnhandled(scope)); | ||
} | ||
@@ -63,3 +63,3 @@ _optionalChain([span, 'optionalAccess', _ => _.end, 'call', _2 => _2()]); | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
node.flush(options.flushTimeout) | ||
nodeExperimental.flush(options.flushTimeout) | ||
.then(null, e => { | ||
@@ -79,3 +79,3 @@ debugBuild.DEBUG_BUILD && utils$1.logger.error(e); | ||
err => { | ||
node.captureException(err, scope => utils.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(err, scope => utils.markEventUnhandled(scope)); | ||
}, | ||
@@ -82,0 +82,0 @@ ); |
@@ -8,3 +8,3 @@ var { | ||
const core = require('@sentry/core'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils$1 = require('@sentry/utils'); | ||
@@ -14,4 +14,2 @@ const debugBuild = require('../debug-build.js'); | ||
// TODO (v8 / #5257): Remove this whole old/new business and just use the new stuff | ||
/** | ||
@@ -24,6 +22,3 @@ * Wraps an HTTP function handler adding it error capture and tracing capabilities. | ||
*/ | ||
function wrapHttpFunction( | ||
fn, | ||
wrapOptions = {}, | ||
) { | ||
function wrapHttpFunction(fn, wrapOptions = {}) { | ||
const wrap = (f) => utils.domainify(_wrapHttpFunction(f, wrapOptions)); | ||
@@ -44,13 +39,4 @@ | ||
/** */ | ||
function _wrapHttpFunction(fn, wrapOptions = {}) { | ||
// TODO (v8 / #5257): Switch to using `addRequestDataToEventOptions` | ||
// eslint-disable-next-line deprecation/deprecation | ||
const { parseRequestOptions } = wrapOptions ; | ||
const options = { | ||
flushTimeout: 2000, | ||
// TODO (v8 / xxx): Remove this line, since `addRequestDataToEventOptions` will be included in the spread of `wrapOptions` | ||
addRequestDataToEventOptions: parseRequestOptions ? { include: parseRequestOptions } : {}, | ||
...wrapOptions, | ||
}; | ||
function _wrapHttpFunction(fn, options) { | ||
const flushTimeout = options.flushTimeout || 2000; | ||
return (req, res) => { | ||
@@ -63,4 +49,4 @@ const reqMethod = (req.method || '').toUpperCase(); | ||
return node.continueTrace({ sentryTrace, baggage }, () => { | ||
return node.startSpanManual( | ||
return nodeExperimental.continueTrace({ sentryTrace, baggage }, () => { | ||
return nodeExperimental.startSpanManual( | ||
{ | ||
@@ -75,5 +61,4 @@ name: `${reqMethod} ${reqUrl}`, | ||
span => { | ||
node.getCurrentScope().setSDKProcessingMetadata({ | ||
nodeExperimental.getCurrentScope().setSDKProcessingMetadata({ | ||
request: req, | ||
requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions, | ||
}); | ||
@@ -99,3 +84,3 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
node.flush(options.flushTimeout) | ||
nodeExperimental.flush(flushTimeout) | ||
.then(null, e => { | ||
@@ -112,3 +97,3 @@ debugBuild.DEBUG_BUILD && utils$1.logger.error(e); | ||
err => { | ||
node.captureException(err, scope => utils.markEventUnhandled(scope)); | ||
nodeExperimental.captureException(err, scope => utils.markEventUnhandled(scope)); | ||
}, | ||
@@ -115,0 +100,0 @@ ); |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const googleCloudGrpc = require('../google-cloud-grpc.js'); | ||
@@ -10,14 +10,6 @@ const googleCloudHttp = require('../google-cloud-http.js'); | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
const defaultIntegrations = [ | ||
// eslint-disable-next-line deprecation/deprecation | ||
...node.defaultIntegrations, | ||
googleCloudHttp.googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing. | ||
googleCloudGrpc.googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing. | ||
]; | ||
/** Get the default integrations for the GCP SDK. */ | ||
function getDefaultIntegrations(options) { | ||
return [ | ||
...node.getDefaultIntegrations(options), | ||
...nodeExperimental.getDefaultIntegrations(options), | ||
googleCloudHttp.googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing. | ||
@@ -44,9 +36,9 @@ googleCloudGrpc.googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing. | ||
name: 'npm:@sentry/serverless', | ||
version: node.SDK_VERSION, | ||
version: nodeExperimental.SDK_VERSION, | ||
}, | ||
], | ||
version: node.SDK_VERSION, | ||
version: nodeExperimental.SDK_VERSION, | ||
}; | ||
node.init(opts); | ||
nodeExperimental.init(opts); | ||
} | ||
@@ -57,5 +49,4 @@ | ||
exports.wrapCloudEventFunction = cloud_events.wrapCloudEventFunction; | ||
exports.defaultIntegrations = defaultIntegrations; | ||
exports.getDefaultIntegrations = getDefaultIntegrations; | ||
exports.init = init; | ||
//# sourceMappingURL=index.js.map |
@@ -8,3 +8,3 @@ var { | ||
const core = require('@sentry/core'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils = require('@sentry/utils'); | ||
@@ -100,3 +100,3 @@ | ||
} | ||
const span = node.startInactiveSpan({ | ||
const span = nodeExperimental.startInactiveSpan({ | ||
name: `${callType} ${methodName}`, | ||
@@ -103,0 +103,0 @@ onlyIfParent: true, |
Object.defineProperty(exports, '__esModule', { value: true }); | ||
const core = require('@sentry/core'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const utils = require('@sentry/utils'); | ||
@@ -52,3 +52,3 @@ | ||
const span = SETUP_CLIENTS.has(core.getClient() ) | ||
? node.startInactiveSpan({ | ||
? nodeExperimental.startInactiveSpan({ | ||
name: `${httpMethod} ${reqOpts.uri}`, | ||
@@ -55,0 +55,0 @@ onlyIfParent: true, |
179
cjs/index.js
@@ -6,3 +6,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
const awsservices = require('./awsservices.js'); | ||
const node = require('@sentry/node'); | ||
const nodeExperimental = require('@sentry/node-experimental'); | ||
const core = require('@sentry/core'); | ||
@@ -15,92 +16,88 @@ | ||
exports.awsServicesIntegration = awsservices.awsServicesIntegration; | ||
exports.DEFAULT_USER_INCLUDES = node.DEFAULT_USER_INCLUDES; | ||
exports.Handlers = node.Handlers; | ||
exports.Hub = node.Hub; | ||
exports.Integrations = node.Integrations; | ||
exports.NodeClient = node.NodeClient; | ||
exports.SDK_VERSION = node.SDK_VERSION; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = node.SEMANTIC_ATTRIBUTE_SENTRY_OP; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = node.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = node.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = node.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; | ||
exports.Scope = node.Scope; | ||
exports.addBreadcrumb = node.addBreadcrumb; | ||
exports.addEventProcessor = node.addEventProcessor; | ||
exports.addGlobalEventProcessor = node.addGlobalEventProcessor; | ||
exports.addIntegration = node.addIntegration; | ||
exports.addRequestDataToEvent = node.addRequestDataToEvent; | ||
exports.anrIntegration = node.anrIntegration; | ||
exports.autoDiscoverNodePerformanceMonitoringIntegrations = node.autoDiscoverNodePerformanceMonitoringIntegrations; | ||
exports.captureCheckIn = node.captureCheckIn; | ||
exports.captureEvent = node.captureEvent; | ||
exports.captureException = node.captureException; | ||
exports.captureMessage = node.captureMessage; | ||
exports.captureSession = node.captureSession; | ||
exports.close = node.close; | ||
exports.configureScope = node.configureScope; | ||
exports.consoleIntegration = node.consoleIntegration; | ||
exports.contextLinesIntegration = node.contextLinesIntegration; | ||
exports.continueTrace = node.continueTrace; | ||
exports.createGetModuleFromFilename = node.createGetModuleFromFilename; | ||
exports.createTransport = node.createTransport; | ||
exports.deepReadDirSync = node.deepReadDirSync; | ||
exports.defaultIntegrations = node.defaultIntegrations; | ||
exports.defaultStackParser = node.defaultStackParser; | ||
exports.endSession = node.endSession; | ||
exports.extractRequestData = node.extractRequestData; | ||
exports.extractTraceparentData = node.extractTraceparentData; | ||
exports.flush = node.flush; | ||
exports.functionToStringIntegration = node.functionToStringIntegration; | ||
exports.getActiveSpan = node.getActiveSpan; | ||
exports.getActiveTransaction = node.getActiveTransaction; | ||
exports.getClient = node.getClient; | ||
exports.getCurrentHub = node.getCurrentHub; | ||
exports.getCurrentScope = node.getCurrentScope; | ||
exports.getDefaultIntegrations = node.getDefaultIntegrations; | ||
exports.getGlobalScope = node.getGlobalScope; | ||
exports.getHubFromCarrier = node.getHubFromCarrier; | ||
exports.getIsolationScope = node.getIsolationScope; | ||
exports.getModuleFromFilename = node.getModuleFromFilename; | ||
exports.getSentryRelease = node.getSentryRelease; | ||
exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode; | ||
exports.hapiIntegration = node.hapiIntegration; | ||
exports.httpIntegration = node.httpIntegration; | ||
exports.inboundFiltersIntegration = node.inboundFiltersIntegration; | ||
exports.init = node.init; | ||
exports.isInitialized = node.isInitialized; | ||
exports.lastEventId = node.lastEventId; | ||
exports.linkedErrorsIntegration = node.linkedErrorsIntegration; | ||
exports.localVariablesIntegration = node.localVariablesIntegration; | ||
exports.makeMain = node.makeMain; | ||
exports.makeNodeTransport = node.makeNodeTransport; | ||
exports.metrics = node.metrics; | ||
exports.modulesIntegration = node.modulesIntegration; | ||
exports.nativeNodeFetchintegration = node.nativeNodeFetchintegration; | ||
exports.nodeContextIntegration = node.nodeContextIntegration; | ||
exports.onUncaughtExceptionIntegration = node.onUncaughtExceptionIntegration; | ||
exports.onUnhandledRejectionIntegration = node.onUnhandledRejectionIntegration; | ||
exports.parameterize = node.parameterize; | ||
exports.requestDataIntegration = node.requestDataIntegration; | ||
exports.runWithAsyncContext = node.runWithAsyncContext; | ||
exports.setContext = node.setContext; | ||
exports.setCurrentClient = node.setCurrentClient; | ||
exports.setExtra = node.setExtra; | ||
exports.setExtras = node.setExtras; | ||
exports.setHttpStatus = node.setHttpStatus; | ||
exports.setMeasurement = node.setMeasurement; | ||
exports.setTag = node.setTag; | ||
exports.setTags = node.setTags; | ||
exports.setUser = node.setUser; | ||
exports.spanStatusfromHttpCode = node.spanStatusfromHttpCode; | ||
exports.spotlightIntegration = node.spotlightIntegration; | ||
exports.startActiveSpan = node.startActiveSpan; | ||
exports.startInactiveSpan = node.startInactiveSpan; | ||
exports.startSession = node.startSession; | ||
exports.startSpan = node.startSpan; | ||
exports.startSpanManual = node.startSpanManual; | ||
exports.startTransaction = node.startTransaction; | ||
exports.withActiveSpan = node.withActiveSpan; | ||
exports.withIsolationScope = node.withIsolationScope; | ||
exports.withMonitor = node.withMonitor; | ||
exports.withScope = node.withScope; | ||
exports.DEFAULT_USER_INCLUDES = nodeExperimental.DEFAULT_USER_INCLUDES; | ||
exports.Handlers = nodeExperimental.Handlers; | ||
exports.Hub = nodeExperimental.Hub; | ||
exports.Integrations = nodeExperimental.Integrations; | ||
exports.NodeClient = nodeExperimental.NodeClient; | ||
exports.SDK_VERSION = nodeExperimental.SDK_VERSION; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_OP = nodeExperimental.SEMANTIC_ATTRIBUTE_SENTRY_OP; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN = nodeExperimental.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = nodeExperimental.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE; | ||
exports.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = nodeExperimental.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE; | ||
exports.Scope = nodeExperimental.Scope; | ||
exports.addBreadcrumb = nodeExperimental.addBreadcrumb; | ||
exports.addEventProcessor = nodeExperimental.addEventProcessor; | ||
exports.addGlobalEventProcessor = nodeExperimental.addGlobalEventProcessor; | ||
exports.addIntegration = nodeExperimental.addIntegration; | ||
exports.addRequestDataToEvent = nodeExperimental.addRequestDataToEvent; | ||
exports.anrIntegration = nodeExperimental.anrIntegration; | ||
exports.autoDiscoverNodePerformanceMonitoringIntegrations = nodeExperimental.autoDiscoverNodePerformanceMonitoringIntegrations; | ||
exports.captureCheckIn = nodeExperimental.captureCheckIn; | ||
exports.captureEvent = nodeExperimental.captureEvent; | ||
exports.captureException = nodeExperimental.captureException; | ||
exports.captureMessage = nodeExperimental.captureMessage; | ||
exports.captureSession = nodeExperimental.captureSession; | ||
exports.close = nodeExperimental.close; | ||
exports.consoleIntegration = nodeExperimental.consoleIntegration; | ||
exports.contextLinesIntegration = nodeExperimental.contextLinesIntegration; | ||
exports.continueTrace = nodeExperimental.continueTrace; | ||
exports.createGetModuleFromFilename = nodeExperimental.createGetModuleFromFilename; | ||
exports.createTransport = nodeExperimental.createTransport; | ||
exports.defaultStackParser = nodeExperimental.defaultStackParser; | ||
exports.endSession = nodeExperimental.endSession; | ||
exports.extractRequestData = nodeExperimental.extractRequestData; | ||
exports.flush = nodeExperimental.flush; | ||
exports.functionToStringIntegration = nodeExperimental.functionToStringIntegration; | ||
exports.getActiveSpan = nodeExperimental.getActiveSpan; | ||
exports.getActiveTransaction = nodeExperimental.getActiveTransaction; | ||
exports.getClient = nodeExperimental.getClient; | ||
exports.getCurrentHub = nodeExperimental.getCurrentHub; | ||
exports.getCurrentScope = nodeExperimental.getCurrentScope; | ||
exports.getDefaultIntegrations = nodeExperimental.getDefaultIntegrations; | ||
exports.getGlobalScope = nodeExperimental.getGlobalScope; | ||
exports.getIsolationScope = nodeExperimental.getIsolationScope; | ||
exports.getSentryRelease = nodeExperimental.getSentryRelease; | ||
exports.getSpanStatusFromHttpCode = nodeExperimental.getSpanStatusFromHttpCode; | ||
exports.hapiIntegration = nodeExperimental.hapiIntegration; | ||
exports.httpIntegration = nodeExperimental.httpIntegration; | ||
exports.inboundFiltersIntegration = nodeExperimental.inboundFiltersIntegration; | ||
exports.init = nodeExperimental.init; | ||
exports.isInitialized = nodeExperimental.isInitialized; | ||
exports.linkedErrorsIntegration = nodeExperimental.linkedErrorsIntegration; | ||
exports.localVariablesIntegration = nodeExperimental.localVariablesIntegration; | ||
exports.makeMain = nodeExperimental.makeMain; | ||
exports.makeNodeTransport = nodeExperimental.makeNodeTransport; | ||
exports.metrics = nodeExperimental.metrics; | ||
exports.modulesIntegration = nodeExperimental.modulesIntegration; | ||
exports.nativeNodeFetchintegration = nodeExperimental.nativeNodeFetchintegration; | ||
exports.nodeContextIntegration = nodeExperimental.nodeContextIntegration; | ||
exports.onUncaughtExceptionIntegration = nodeExperimental.onUncaughtExceptionIntegration; | ||
exports.onUnhandledRejectionIntegration = nodeExperimental.onUnhandledRejectionIntegration; | ||
exports.parameterize = nodeExperimental.parameterize; | ||
exports.requestDataIntegration = nodeExperimental.requestDataIntegration; | ||
exports.setContext = nodeExperimental.setContext; | ||
exports.setCurrentClient = nodeExperimental.setCurrentClient; | ||
exports.setExtra = nodeExperimental.setExtra; | ||
exports.setExtras = nodeExperimental.setExtras; | ||
exports.setHttpStatus = nodeExperimental.setHttpStatus; | ||
exports.setMeasurement = nodeExperimental.setMeasurement; | ||
exports.setTag = nodeExperimental.setTag; | ||
exports.setTags = nodeExperimental.setTags; | ||
exports.setUser = nodeExperimental.setUser; | ||
exports.spotlightIntegration = nodeExperimental.spotlightIntegration; | ||
exports.startInactiveSpan = nodeExperimental.startInactiveSpan; | ||
exports.startSession = nodeExperimental.startSession; | ||
exports.startSpan = nodeExperimental.startSpan; | ||
exports.startSpanManual = nodeExperimental.startSpanManual; | ||
exports.startTransaction = nodeExperimental.startTransaction; | ||
exports.withActiveSpan = nodeExperimental.withActiveSpan; | ||
exports.withIsolationScope = nodeExperimental.withIsolationScope; | ||
exports.withMonitor = nodeExperimental.withMonitor; | ||
exports.withScope = nodeExperimental.withScope; | ||
exports.captureConsoleIntegration = core.captureConsoleIntegration; | ||
exports.debugIntegration = core.debugIntegration; | ||
exports.dedupeIntegration = core.dedupeIntegration; | ||
exports.extraErrorDataIntegration = core.extraErrorDataIntegration; | ||
exports.rewriteFramesIntegration = core.rewriteFramesIntegration; | ||
exports.sessionTimingIntegration = core.sessionTimingIntegration; | ||
//# sourceMappingURL=index.js.map |
@@ -11,3 +11,3 @@ Object.defineProperty(exports, '__esModule', { value: true }); | ||
function domainify(fn) { | ||
return (...args) => core.runWithAsyncContext(() => fn(...args), { reuseExisting: true }); | ||
return (...args) => core.withIsolationScope(() => fn(...args)); | ||
} | ||
@@ -14,0 +14,0 @@ |
@@ -6,5 +6,5 @@ import { _optionalChain } from '@sentry/utils'; | ||
import { types } from 'util'; | ||
import * as node from '@sentry/node'; | ||
import { defaultIntegrations as defaultIntegrations$1, getDefaultIntegrations as getDefaultIntegrations$1, SDK_VERSION, init as init$1, withScope, captureMessage, continueTrace, startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node'; | ||
export * from '@sentry/node'; | ||
import * as nodeExperimental from '@sentry/node-experimental'; | ||
import { getDefaultIntegrations as getDefaultIntegrations$1, SDK_VERSION, init as init$1, withScope, captureMessage, continueTrace, startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node-experimental'; | ||
export * from '@sentry/node-experimental'; | ||
import { logger, isString } from '@sentry/utils'; | ||
@@ -21,9 +21,2 @@ import { performance } from 'perf_hooks'; | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
const defaultIntegrations = [ | ||
// eslint-disable-next-line deprecation/deprecation | ||
...defaultIntegrations$1, | ||
awsServicesIntegration({ optional: true }), | ||
]; | ||
/** Get the default integrations for the AWSLambda SDK. */ | ||
@@ -320,3 +313,3 @@ function getDefaultIntegrations(options) { | ||
export { defaultIntegrations, getDefaultIntegrations, init, tryPatchHandler, wrapHandler }; | ||
export { getDefaultIntegrations, init, tryPatchHandler, wrapHandler }; | ||
//# sourceMappingURL=awslambda.js.map |
import { defineIntegration, convertIntegrationFnToClass, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; | ||
import { getClient, startInactiveSpan } from '@sentry/node'; | ||
import { getClient, startInactiveSpan } from '@sentry/node-experimental'; | ||
import { fill } from '@sentry/utils'; | ||
@@ -4,0 +4,0 @@ |
import { _optionalChain } from '@sentry/utils'; | ||
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, handleCallbackErrors } from '@sentry/core'; | ||
import { startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node'; | ||
import { startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node-experimental'; | ||
import { logger } from '@sentry/utils'; | ||
@@ -5,0 +5,0 @@ import { DEBUG_BUILD } from '../debug-build.js'; |
import { _optionalChain } from '@sentry/utils'; | ||
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, handleCallbackErrors } from '@sentry/core'; | ||
import { startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node'; | ||
import { startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node-experimental'; | ||
import { logger } from '@sentry/utils'; | ||
@@ -5,0 +5,0 @@ import { DEBUG_BUILD } from '../debug-build.js'; |
import { _optionalChain } from '@sentry/utils'; | ||
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, Transaction, setHttpStatus, handleCallbackErrors } from '@sentry/core'; | ||
import { continueTrace, startSpanManual, getCurrentScope, flush, captureException } from '@sentry/node'; | ||
import { continueTrace, startSpanManual, getCurrentScope, flush, captureException } from '@sentry/node-experimental'; | ||
import { stripUrlQueryAndFragment, isString, logger } from '@sentry/utils'; | ||
@@ -8,4 +8,2 @@ import { DEBUG_BUILD } from '../debug-build.js'; | ||
// TODO (v8 / #5257): Remove this whole old/new business and just use the new stuff | ||
/** | ||
@@ -18,6 +16,3 @@ * Wraps an HTTP function handler adding it error capture and tracing capabilities. | ||
*/ | ||
function wrapHttpFunction( | ||
fn, | ||
wrapOptions = {}, | ||
) { | ||
function wrapHttpFunction(fn, wrapOptions = {}) { | ||
const wrap = (f) => domainify(_wrapHttpFunction(f, wrapOptions)); | ||
@@ -38,13 +33,4 @@ | ||
/** */ | ||
function _wrapHttpFunction(fn, wrapOptions = {}) { | ||
// TODO (v8 / #5257): Switch to using `addRequestDataToEventOptions` | ||
// eslint-disable-next-line deprecation/deprecation | ||
const { parseRequestOptions } = wrapOptions ; | ||
const options = { | ||
flushTimeout: 2000, | ||
// TODO (v8 / xxx): Remove this line, since `addRequestDataToEventOptions` will be included in the spread of `wrapOptions` | ||
addRequestDataToEventOptions: parseRequestOptions ? { include: parseRequestOptions } : {}, | ||
...wrapOptions, | ||
}; | ||
function _wrapHttpFunction(fn, options) { | ||
const flushTimeout = options.flushTimeout || 2000; | ||
return (req, res) => { | ||
@@ -70,3 +56,2 @@ const reqMethod = (req.method || '').toUpperCase(); | ||
request: req, | ||
requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions, | ||
}); | ||
@@ -92,3 +77,3 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
flush(options.flushTimeout) | ||
flush(flushTimeout) | ||
.then(null, e => { | ||
@@ -95,0 +80,0 @@ DEBUG_BUILD && logger.error(e); |
@@ -1,2 +0,2 @@ | ||
import { defaultIntegrations as defaultIntegrations$1, getDefaultIntegrations as getDefaultIntegrations$1, SDK_VERSION, init as init$1 } from '@sentry/node'; | ||
import { getDefaultIntegrations as getDefaultIntegrations$1, SDK_VERSION, init as init$1 } from '@sentry/node-experimental'; | ||
import { googleCloudGrpcIntegration } from '../google-cloud-grpc.js'; | ||
@@ -8,10 +8,2 @@ import { googleCloudHttpIntegration } from '../google-cloud-http.js'; | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
const defaultIntegrations = [ | ||
// eslint-disable-next-line deprecation/deprecation | ||
...defaultIntegrations$1, | ||
googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing. | ||
googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing. | ||
]; | ||
/** Get the default integrations for the GCP SDK. */ | ||
@@ -51,3 +43,3 @@ function getDefaultIntegrations(options) { | ||
export { defaultIntegrations, getDefaultIntegrations, init }; | ||
export { getDefaultIntegrations, init }; | ||
//# sourceMappingURL=index.js.map |
import { _optionalChain } from '@sentry/utils'; | ||
import { defineIntegration, convertIntegrationFnToClass, getClient, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; | ||
import { startInactiveSpan } from '@sentry/node'; | ||
import { startInactiveSpan } from '@sentry/node-experimental'; | ||
import { fill } from '@sentry/utils'; | ||
@@ -5,0 +5,0 @@ |
import { defineIntegration, convertIntegrationFnToClass, getClient, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; | ||
import { startInactiveSpan } from '@sentry/node'; | ||
import { startInactiveSpan } from '@sentry/node-experimental'; | ||
import { fill } from '@sentry/utils'; | ||
@@ -4,0 +4,0 @@ |
@@ -6,3 +6,4 @@ import * as awslambda from './awslambda.js'; | ||
export { AWSServices, awsServicesIntegration } from './awsservices.js'; | ||
export { DEFAULT_USER_INCLUDES, Handlers, Hub, Integrations, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addGlobalEventProcessor, addIntegration, addRequestDataToEvent, anrIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, configureScope, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, deepReadDirSync, defaultIntegrations, defaultStackParser, endSession, extractRequestData, extractTraceparentData, flush, functionToStringIntegration, getActiveSpan, getActiveTransaction, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getHubFromCarrier, getIsolationScope, getModuleFromFilename, getSentryRelease, getSpanStatusFromHttpCode, hapiIntegration, httpIntegration, inboundFiltersIntegration, init, isInitialized, lastEventId, linkedErrorsIntegration, localVariablesIntegration, makeMain, makeNodeTransport, metrics, modulesIntegration, nativeNodeFetchintegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, requestDataIntegration, runWithAsyncContext, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, spanStatusfromHttpCode, spotlightIntegration, startActiveSpan, startInactiveSpan, startSession, startSpan, startSpanManual, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope } from '@sentry/node'; | ||
export { DEFAULT_USER_INCLUDES, Handlers, Hub, Integrations, NodeClient, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addGlobalEventProcessor, addIntegration, addRequestDataToEvent, anrIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureCheckIn, captureEvent, captureException, captureMessage, captureSession, close, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, defaultStackParser, endSession, extractRequestData, flush, functionToStringIntegration, getActiveSpan, getActiveTransaction, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getIsolationScope, getSentryRelease, getSpanStatusFromHttpCode, hapiIntegration, httpIntegration, inboundFiltersIntegration, init, isInitialized, linkedErrorsIntegration, localVariablesIntegration, makeMain, makeNodeTransport, metrics, modulesIntegration, nativeNodeFetchintegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, parameterize, requestDataIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, spotlightIntegration, startInactiveSpan, startSession, startSpan, startSpanManual, startTransaction, withActiveSpan, withIsolationScope, withMonitor, withScope } from '@sentry/node-experimental'; | ||
export { captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration } from '@sentry/core'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { runWithAsyncContext } from '@sentry/core'; | ||
import { withIsolationScope } from '@sentry/core'; | ||
import { addExceptionMechanism } from '@sentry/utils'; | ||
@@ -9,3 +9,3 @@ | ||
function domainify(fn) { | ||
return (...args) => runWithAsyncContext(() => fn(...args), { reuseExisting: true }); | ||
return (...args) => withIsolationScope(() => fn(...args)); | ||
} | ||
@@ -12,0 +12,0 @@ |
{ | ||
"name": "@sentry/serverless", | ||
"version": "7.105.0", | ||
"version": "8.0.0-alpha.2", | ||
"description": "Official Sentry SDK for various serverless solutions", | ||
@@ -10,3 +10,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"engines": { | ||
"node": ">=10" | ||
"node": ">=14.8" | ||
}, | ||
@@ -33,6 +33,6 @@ "files": [ | ||
"dependencies": { | ||
"@sentry/core": "7.105.0", | ||
"@sentry/node": "7.105.0", | ||
"@sentry/types": "7.105.0", | ||
"@sentry/utils": "7.105.0", | ||
"@sentry/core": "8.0.0-alpha.2", | ||
"@sentry/node-experimental": "8.0.0-alpha.2", | ||
"@sentry/types": "8.0.0-alpha.2", | ||
"@sentry/utils": "8.0.0-alpha.2", | ||
"@types/aws-lambda": "^8.10.62", | ||
@@ -39,0 +39,0 @@ "@types/express": "^4.17.14" |
@@ -1,5 +0,5 @@ | ||
import { NodeOptions } from '@sentry/node'; | ||
import { NodeOptions } from '@sentry/node-experimental'; | ||
import { Integration, Options } from '@sentry/types'; | ||
import { Handler } from 'aws-lambda'; | ||
export * from '@sentry/node'; | ||
export * from '@sentry/node-experimental'; | ||
export type AsyncHandler<T extends Handler> = (event: Parameters<T>[0], context: Parameters<T>[1]) => Promise<NonNullable<Parameters<Parameters<T>[2]>[1]>>; | ||
@@ -28,4 +28,2 @@ export interface WrapperOptions { | ||
} | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
export declare const defaultIntegrations: Integration[]; | ||
/** Get the default integrations for the AWSLambda SDK. */ | ||
@@ -32,0 +30,0 @@ export declare function getDefaultIntegrations(options: Options): Integration[]; |
@@ -1,17 +0,2 @@ | ||
import { AddRequestDataToEventOptions } from '@sentry/node'; | ||
import { HttpFunction, WrapperOptions } from './general'; | ||
type ParseRequestOptions = AddRequestDataToEventOptions['include'] & { | ||
serverName?: boolean; | ||
version?: boolean; | ||
}; | ||
interface OldHttpFunctionWrapperOptions extends WrapperOptions { | ||
/** | ||
* @deprecated Use `addRequestDataToEventOptions` instead. | ||
*/ | ||
parseRequestOptions: ParseRequestOptions; | ||
} | ||
interface NewHttpFunctionWrapperOptions extends WrapperOptions { | ||
addRequestDataToEventOptions: AddRequestDataToEventOptions; | ||
} | ||
export type HttpFunctionWrapperOptions = OldHttpFunctionWrapperOptions | NewHttpFunctionWrapperOptions; | ||
/** | ||
@@ -24,4 +9,3 @@ * Wraps an HTTP function handler adding it error capture and tracing capabilities. | ||
*/ | ||
export declare function wrapHttpFunction(fn: HttpFunction, wrapOptions?: Partial<HttpFunctionWrapperOptions>): HttpFunction; | ||
export {}; | ||
export declare function wrapHttpFunction(fn: HttpFunction, wrapOptions?: Partial<WrapperOptions>): HttpFunction; | ||
//# sourceMappingURL=http.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { NodeOptions } from '@sentry/node'; | ||
import { NodeOptions } from '@sentry/node-experimental'; | ||
import { Integration, Options } from '@sentry/types'; | ||
@@ -6,4 +6,2 @@ export * from './http'; | ||
export * from './cloud_events'; | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
export declare const defaultIntegrations: Integration[]; | ||
/** Get the default integrations for the GCP SDK. */ | ||
@@ -10,0 +8,0 @@ export declare function getDefaultIntegrations(options: Options): Integration[]; |
@@ -5,3 +5,4 @@ import * as AWSLambda from './awslambda'; | ||
export { AWSServices, awsServicesIntegration } from './awsservices'; | ||
export { Hub, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, addEventProcessor, addIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureEvent, captureException, captureMessage, captureCheckIn, withMonitor, configureScope, createTransport, getActiveTransaction, getCurrentHub, getClient, isInitialized, getCurrentScope, getGlobalScope, getIsolationScope, getHubFromCarrier, spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, makeMain, setCurrentClient, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, withIsolationScope, NodeClient, makeNodeTransport, close, defaultIntegrations, getDefaultIntegrations, defaultStackParser, flush, getSentryRelease, init, lastEventId, DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData, deepReadDirSync, Handlers, Integrations, setMeasurement, getActiveSpan, startSpan, startActiveSpan, startInactiveSpan, startSpanManual, withActiveSpan, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, getModuleFromFilename, createGetModuleFromFilename, metrics, extractTraceparentData, runWithAsyncContext, consoleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, anrIntegration, hapiIntegration, httpIntegration, nativeNodeFetchintegration, spotlightIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, startSession, captureSession, endSession, } from '@sentry/node'; | ||
export { Hub, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, addEventProcessor, addIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureEvent, captureException, captureMessage, captureCheckIn, withMonitor, createTransport, getActiveTransaction, getCurrentHub, getClient, isInitialized, getCurrentScope, getGlobalScope, getIsolationScope, getSpanStatusFromHttpCode, setHttpStatus, makeMain, setCurrentClient, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, withIsolationScope, NodeClient, makeNodeTransport, close, getDefaultIntegrations, defaultStackParser, flush, getSentryRelease, init, DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData, Handlers, Integrations, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, createGetModuleFromFilename, metrics, consoleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, anrIntegration, hapiIntegration, httpIntegration, nativeNodeFetchintegration, spotlightIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, startSession, captureSession, endSession, } from '@sentry/node-experimental'; | ||
export { captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, } from '@sentry/core'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,5 +0,5 @@ | ||
import type { NodeOptions } from '@sentry/node'; | ||
import type { NodeOptions } from '@sentry/node-experimental'; | ||
import type { Integration, Options } from '@sentry/types'; | ||
import type { Handler } from 'aws-lambda'; | ||
export * from '@sentry/node'; | ||
export * from '@sentry/node-experimental'; | ||
export type AsyncHandler<T extends Handler> = (event: Parameters<T>[0], context: Parameters<T>[1]) => Promise<NonNullable<Parameters<Parameters<T>[2]>[1]>>; | ||
@@ -28,4 +28,2 @@ export interface WrapperOptions { | ||
} | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
export declare const defaultIntegrations: Integration[]; | ||
/** Get the default integrations for the AWSLambda SDK. */ | ||
@@ -32,0 +30,0 @@ export declare function getDefaultIntegrations(options: Options): Integration[]; |
@@ -1,17 +0,2 @@ | ||
import type { AddRequestDataToEventOptions } from '@sentry/node'; | ||
import type { HttpFunction, WrapperOptions } from './general'; | ||
type ParseRequestOptions = AddRequestDataToEventOptions['include'] & { | ||
serverName?: boolean; | ||
version?: boolean; | ||
}; | ||
interface OldHttpFunctionWrapperOptions extends WrapperOptions { | ||
/** | ||
* @deprecated Use `addRequestDataToEventOptions` instead. | ||
*/ | ||
parseRequestOptions: ParseRequestOptions; | ||
} | ||
interface NewHttpFunctionWrapperOptions extends WrapperOptions { | ||
addRequestDataToEventOptions: AddRequestDataToEventOptions; | ||
} | ||
export type HttpFunctionWrapperOptions = OldHttpFunctionWrapperOptions | NewHttpFunctionWrapperOptions; | ||
/** | ||
@@ -24,4 +9,3 @@ * Wraps an HTTP function handler adding it error capture and tracing capabilities. | ||
*/ | ||
export declare function wrapHttpFunction(fn: HttpFunction, wrapOptions?: Partial<HttpFunctionWrapperOptions>): HttpFunction; | ||
export {}; | ||
export declare function wrapHttpFunction(fn: HttpFunction, wrapOptions?: Partial<WrapperOptions>): HttpFunction; | ||
//# sourceMappingURL=http.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import type { NodeOptions } from '@sentry/node'; | ||
import type { NodeOptions } from '@sentry/node-experimental'; | ||
import type { Integration, Options } from '@sentry/types'; | ||
@@ -6,4 +6,2 @@ export * from './http'; | ||
export * from './cloud_events'; | ||
/** @deprecated Use `getDefaultIntegrations(options)` instead. */ | ||
export declare const defaultIntegrations: Integration[]; | ||
/** Get the default integrations for the GCP SDK. */ | ||
@@ -10,0 +8,0 @@ export declare function getDefaultIntegrations(options: Options): Integration[]; |
@@ -5,3 +5,4 @@ import * as AWSLambda from './awslambda'; | ||
export { AWSServices, awsServicesIntegration } from './awsservices'; | ||
export { Hub, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, addEventProcessor, addIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureEvent, captureException, captureMessage, captureCheckIn, withMonitor, configureScope, createTransport, getActiveTransaction, getCurrentHub, getClient, isInitialized, getCurrentScope, getGlobalScope, getIsolationScope, getHubFromCarrier, spanStatusfromHttpCode, getSpanStatusFromHttpCode, setHttpStatus, makeMain, setCurrentClient, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, withIsolationScope, NodeClient, makeNodeTransport, close, defaultIntegrations, getDefaultIntegrations, defaultStackParser, flush, getSentryRelease, init, lastEventId, DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData, deepReadDirSync, Handlers, Integrations, setMeasurement, getActiveSpan, startSpan, startActiveSpan, startInactiveSpan, startSpanManual, withActiveSpan, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, getModuleFromFilename, createGetModuleFromFilename, metrics, extractTraceparentData, runWithAsyncContext, consoleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, anrIntegration, hapiIntegration, httpIntegration, nativeNodeFetchintegration, spotlightIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, startSession, captureSession, endSession, } from '@sentry/node'; | ||
export { Hub, SDK_VERSION, Scope, addBreadcrumb, addGlobalEventProcessor, addEventProcessor, addIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureEvent, captureException, captureMessage, captureCheckIn, withMonitor, createTransport, getActiveTransaction, getCurrentHub, getClient, isInitialized, getCurrentScope, getGlobalScope, getIsolationScope, getSpanStatusFromHttpCode, setHttpStatus, makeMain, setCurrentClient, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, withIsolationScope, NodeClient, makeNodeTransport, close, getDefaultIntegrations, defaultStackParser, flush, getSentryRelease, init, DEFAULT_USER_INCLUDES, addRequestDataToEvent, extractRequestData, Handlers, Integrations, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, withActiveSpan, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, createGetModuleFromFilename, metrics, consoleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, anrIntegration, hapiIntegration, httpIntegration, nativeNodeFetchintegration, spotlightIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, startSession, captureSession, endSession, } from '@sentry/node-experimental'; | ||
export { captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, } from '@sentry/core'; | ||
//# sourceMappingURL=index.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
343227
2344
2
+ Added@sentry-internal/tracing@8.0.0-alpha.2(transitive)
+ Added@sentry/core@8.0.0-alpha.2(transitive)
+ Added@sentry/node-experimental@8.0.0-alpha.2(transitive)
+ Added@sentry/types@8.0.0-alpha.2(transitive)
+ Added@sentry/utils@8.0.0-alpha.2(transitive)
- Removed@sentry/node@7.105.0
- Removed@sentry-internal/tracing@7.105.0(transitive)
- Removed@sentry/core@7.105.0(transitive)
- Removed@sentry/node@7.105.0(transitive)
- Removed@sentry/types@7.105.0(transitive)
- Removed@sentry/utils@7.105.0(transitive)
Updated@sentry/core@8.0.0-alpha.2
Updated@sentry/types@8.0.0-alpha.2
Updated@sentry/utils@8.0.0-alpha.2