Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/serverless

Package Overview
Dependencies
Maintainers
11
Versions
306
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/serverless - npm Package Compare versions

Comparing version 7.99.0 to 7.100.0

31

cjs/awslambda.js

@@ -296,20 +296,19 @@ var {

const continueTraceContext = node.continueTrace({ sentryTrace, baggage });
return node.continueTrace({ sentryTrace, baggage }, () => {
return node.startSpanManual(
{
name: context.functionName,
op: 'function.aws.lambda',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless',
},
},
span => {
enhanceScopeWithTransactionData(node.getCurrentScope(), context);
return node.startSpanManual(
{
name: context.functionName,
op: 'function.aws.lambda',
...continueTraceContext,
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless',
return processResult(span);
},
},
span => {
enhanceScopeWithTransactionData(node.getCurrentScope(), context);
return processResult(span);
},
);
);
});
}

@@ -316,0 +315,0 @@

@@ -59,55 +59,54 @@ var {

const continueTraceContext = node.continueTrace({ sentryTrace, baggage });
return node.startSpanManual(
{
...continueTraceContext,
name: `${reqMethod} ${reqUrl}`,
op: 'function.gcp.http',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',
return node.continueTrace({ sentryTrace, baggage }, () => {
return node.startSpanManual(
{
name: `${reqMethod} ${reqUrl}`,
op: 'function.gcp.http',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',
},
},
},
span => {
node.getCurrentScope().setSDKProcessingMetadata({
request: req,
requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions,
});
span => {
node.getCurrentScope().setSDKProcessingMetadata({
request: req,
requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions,
});
if (span instanceof core.Transaction) {
// We also set __sentry_transaction on the response so people can grab the transaction there to add
// spans to it later.
// TODO(v8): Remove this
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
(res ).__sentry_transaction = span;
}
// eslint-disable-next-line @typescript-eslint/unbound-method
const _end = res.end;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
res.end = function (chunk, encoding, cb) {
if (span) {
core.setHttpStatus(span, res.statusCode);
span.end();
if (span instanceof core.Transaction) {
// We also set __sentry_transaction on the response so people can grab the transaction there to add
// spans to it later.
// TODO(v8): Remove this
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
(res ).__sentry_transaction = span;
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
node.flush(options.flushTimeout)
.then(null, e => {
debugBuild.DEBUG_BUILD && utils$1.logger.error(e);
})
.then(() => {
_end.call(this, chunk, encoding, cb);
});
};
// eslint-disable-next-line @typescript-eslint/unbound-method
const _end = res.end;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
res.end = function (chunk, encoding, cb) {
if (span) {
core.setHttpStatus(span, res.statusCode);
span.end();
}
return core.handleCallbackErrors(
() => fn(req, res),
err => {
node.captureException(err, scope => utils.markEventUnhandled(scope));
},
);
},
);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
node.flush(options.flushTimeout)
.then(null, e => {
debugBuild.DEBUG_BUILD && utils$1.logger.error(e);
})
.then(() => {
_end.call(this, chunk, encoding, cb);
});
};
return core.handleCallbackErrors(
() => fn(req, res),
err => {
node.captureException(err, scope => utils.markEventUnhandled(scope));
},
);
},
);
});
};

@@ -114,0 +113,0 @@ }

@@ -26,2 +26,3 @@ Object.defineProperty(exports, '__esModule', { value: true });

exports.addRequestDataToEvent = node.addRequestDataToEvent;
exports.anrIntegration = node.anrIntegration;
exports.autoDiscoverNodePerformanceMonitoringIntegrations = node.autoDiscoverNodePerformanceMonitoringIntegrations;

@@ -34,2 +35,4 @@ exports.captureCheckIn = node.captureCheckIn;

exports.configureScope = node.configureScope;
exports.consoleIntegration = node.consoleIntegration;
exports.contextLinesIntegration = node.contextLinesIntegration;
exports.continueTrace = node.continueTrace;

@@ -57,2 +60,4 @@ exports.createGetModuleFromFilename = node.createGetModuleFromFilename;

exports.getSpanStatusFromHttpCode = node.getSpanStatusFromHttpCode;
exports.hapiIntegration = node.hapiIntegration;
exports.httpIntegration = node.httpIntegration;
exports.inboundFiltersIntegration = node.inboundFiltersIntegration;

@@ -63,5 +68,11 @@ exports.init = node.init;

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;

@@ -74,2 +85,3 @@ exports.requestDataIntegration = node.requestDataIntegration;

exports.setExtras = node.setExtras;
exports.setHttpStatus = node.setHttpStatus;
exports.setMeasurement = node.setMeasurement;

@@ -80,2 +92,3 @@ exports.setTag = node.setTag;

exports.spanStatusfromHttpCode = node.spanStatusfromHttpCode;
exports.spotlightIntegration = node.spotlightIntegration;
exports.startActiveSpan = node.startActiveSpan;

@@ -82,0 +95,0 @@ exports.startInactiveSpan = node.startInactiveSpan;

@@ -293,20 +293,19 @@ import { _optionalChain } from '@sentry/utils';

const continueTraceContext = continueTrace({ sentryTrace, baggage });
return continueTrace({ sentryTrace, baggage }, () => {
return startSpanManual(
{
name: context.functionName,
op: 'function.aws.lambda',
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless',
},
},
span => {
enhanceScopeWithTransactionData(getCurrentScope(), context);
return startSpanManual(
{
name: context.functionName,
op: 'function.aws.lambda',
...continueTraceContext,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless',
return processResult(span);
},
},
span => {
enhanceScopeWithTransactionData(getCurrentScope(), context);
return processResult(span);
},
);
);
});
}

@@ -313,0 +312,0 @@

@@ -54,55 +54,54 @@ import { _optionalChain } from '@sentry/utils';

const continueTraceContext = continueTrace({ sentryTrace, baggage });
return startSpanManual(
{
...continueTraceContext,
name: `${reqMethod} ${reqUrl}`,
op: 'function.gcp.http',
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',
return continueTrace({ sentryTrace, baggage }, () => {
return startSpanManual(
{
name: `${reqMethod} ${reqUrl}`,
op: 'function.gcp.http',
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',
},
},
},
span => {
getCurrentScope().setSDKProcessingMetadata({
request: req,
requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions,
});
span => {
getCurrentScope().setSDKProcessingMetadata({
request: req,
requestDataOptionsFromGCPWrapper: options.addRequestDataToEventOptions,
});
if (span instanceof Transaction) {
// We also set __sentry_transaction on the response so people can grab the transaction there to add
// spans to it later.
// TODO(v8): Remove this
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
(res ).__sentry_transaction = span;
}
// eslint-disable-next-line @typescript-eslint/unbound-method
const _end = res.end;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
res.end = function (chunk, encoding, cb) {
if (span) {
setHttpStatus(span, res.statusCode);
span.end();
if (span instanceof Transaction) {
// We also set __sentry_transaction on the response so people can grab the transaction there to add
// spans to it later.
// TODO(v8): Remove this
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
(res ).__sentry_transaction = span;
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
flush(options.flushTimeout)
.then(null, e => {
DEBUG_BUILD && logger.error(e);
})
.then(() => {
_end.call(this, chunk, encoding, cb);
});
};
// eslint-disable-next-line @typescript-eslint/unbound-method
const _end = res.end;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
res.end = function (chunk, encoding, cb) {
if (span) {
setHttpStatus(span, res.statusCode);
span.end();
}
return handleCallbackErrors(
() => fn(req, res),
err => {
captureException(err, scope => markEventUnhandled(scope));
},
);
},
);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
flush(options.flushTimeout)
.then(null, e => {
DEBUG_BUILD && logger.error(e);
})
.then(() => {
_end.call(this, chunk, encoding, cb);
});
};
return handleCallbackErrors(
() => fn(req, res),
err => {
captureException(err, scope => markEventUnhandled(scope));
},
);
},
);
});
};

@@ -109,0 +108,0 @@ }

@@ -6,3 +6,3 @@ import * as awslambda from './awslambda.js';

export { AWSServices, awsServicesIntegration } from './awsservices.js';
export { DEFAULT_USER_INCLUDES, Handlers, Hub, Integrations, NodeClient, SDK_VERSION, Scope, addBreadcrumb, addEventProcessor, addGlobalEventProcessor, addIntegration, addRequestDataToEvent, autoDiscoverNodePerformanceMonitoringIntegrations, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, continueTrace, createGetModuleFromFilename, createTransport, deepReadDirSync, defaultIntegrations, defaultStackParser, extractRequestData, extractTraceparentData, flush, functionToStringIntegration, getActiveSpan, getActiveTransaction, getClient, getCurrentHub, getCurrentScope, getDefaultIntegrations, getGlobalScope, getHubFromCarrier, getIsolationScope, getModuleFromFilename, getSentryRelease, getSpanStatusFromHttpCode, inboundFiltersIntegration, init, isInitialized, lastEventId, linkedErrorsIntegration, makeMain, makeNodeTransport, metrics, parameterize, requestDataIntegration, runWithAsyncContext, setContext, setCurrentClient, setExtra, setExtras, setMeasurement, setTag, setTags, setUser, spanStatusfromHttpCode, startActiveSpan, startInactiveSpan, startSpan, startSpanManual, startTransaction, withIsolationScope, withMonitor, withScope } from '@sentry/node';
export { DEFAULT_USER_INCLUDES, Handlers, Hub, Integrations, NodeClient, SDK_VERSION, Scope, addBreadcrumb, addEventProcessor, addGlobalEventProcessor, addIntegration, addRequestDataToEvent, anrIntegration, autoDiscoverNodePerformanceMonitoringIntegrations, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, consoleIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createTransport, deepReadDirSync, defaultIntegrations, defaultStackParser, 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, startSpan, startSpanManual, startTransaction, withIsolationScope, withMonitor, withScope } from '@sentry/node';
//# sourceMappingURL=index.js.map
{
"name": "@sentry/serverless",
"version": "7.99.0",
"version": "7.100.0",
"description": "Official Sentry SDK for various serverless solutions",

@@ -32,6 +32,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/core": "7.99.0",
"@sentry/node": "7.99.0",
"@sentry/types": "7.99.0",
"@sentry/utils": "7.99.0",
"@sentry/core": "7.100.0",
"@sentry/node": "7.100.0",
"@sentry/types": "7.100.0",
"@sentry/utils": "7.100.0",
"@types/aws-lambda": "^8.10.62",

@@ -38,0 +38,0 @@ "@types/express": "^4.17.14"

@@ -5,3 +5,3 @@ 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, 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, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, getModuleFromFilename, createGetModuleFromFilename, metrics, extractTraceparentData, runWithAsyncContext, } from '@sentry/node';
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, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, getModuleFromFilename, createGetModuleFromFilename, metrics, extractTraceparentData, runWithAsyncContext, consoleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, anrIntegration, hapiIntegration, httpIntegration, nativeNodeFetchintegration, spotlightIntegration, } from '@sentry/node';
//# sourceMappingURL=index.d.ts.map

@@ -5,3 +5,3 @@ 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, 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, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, getModuleFromFilename, createGetModuleFromFilename, metrics, extractTraceparentData, runWithAsyncContext, } from '@sentry/node';
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, continueTrace, parameterize, requestDataIntegration, linkedErrorsIntegration, inboundFiltersIntegration, functionToStringIntegration, getModuleFromFilename, createGetModuleFromFilename, metrics, extractTraceparentData, runWithAsyncContext, consoleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, anrIntegration, hapiIntegration, httpIntegration, nativeNodeFetchintegration, spotlightIntegration, } from '@sentry/node';
//# 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc