@sentry/serverless
Advanced tools
Comparing version 5.30.0 to 6.0.0
@@ -23,4 +23,16 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
options._metadata = options._metadata || {}; | ||
options._metadata.sdk = { | ||
name: 'sentry.javascript.serverless', | ||
integrations: ['AWSLambda'], | ||
packages: [ | ||
{ | ||
name: 'npm:@sentry/serverless', | ||
version: Sentry.SDK_VERSION, | ||
}, | ||
], | ||
version: Sentry.SDK_VERSION, | ||
}; | ||
Sentry.init(options); | ||
Sentry.addGlobalEventProcessor(utils_2.serverlessEventProcessor('AWSLambda')); | ||
Sentry.addGlobalEventProcessor(utils_2.serverlessEventProcessor); | ||
} | ||
@@ -27,0 +39,0 @@ exports.init = init; |
@@ -22,6 +22,18 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
options._metadata = options._metadata || {}; | ||
options._metadata.sdk = { | ||
name: 'sentry.javascript.serverless', | ||
integrations: ['GCPFunction'], | ||
packages: [ | ||
{ | ||
name: 'npm:@sentry/serverless', | ||
version: Sentry.SDK_VERSION, | ||
}, | ||
], | ||
version: Sentry.SDK_VERSION, | ||
}; | ||
Sentry.init(options); | ||
Sentry.addGlobalEventProcessor(utils_1.serverlessEventProcessor('GCPFunction')); | ||
Sentry.addGlobalEventProcessor(utils_1.serverlessEventProcessor); | ||
} | ||
exports.init = init; | ||
//# sourceMappingURL=index.js.map |
@@ -11,3 +11,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare function serverlessEventProcessor(integration: string): (event: Event) => Event; | ||
export declare function serverlessEventProcessor(event: Event): Event; | ||
/** | ||
@@ -21,3 +21,3 @@ * @returns Current active domain with a correct type. | ||
*/ | ||
export declare function domainify<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R; | ||
export declare function domainify<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R | void; | ||
/** | ||
@@ -24,0 +24,0 @@ * @param source function to be wrapped |
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const node_1 = require("@sentry/node"); | ||
const utils_1 = require("@sentry/utils"); | ||
@@ -12,22 +11,7 @@ const domain = require("domain"); | ||
*/ | ||
function serverlessEventProcessor(integration) { | ||
return event => { | ||
event.sdk = { | ||
...event.sdk, | ||
name: 'sentry.javascript.serverless', | ||
integrations: [...((event.sdk && event.sdk.integrations) || []), integration], | ||
packages: [ | ||
...((event.sdk && event.sdk.packages) || []), | ||
{ | ||
name: 'npm:@sentry/serverless', | ||
version: node_1.SDK_VERSION, | ||
}, | ||
], | ||
version: node_1.SDK_VERSION, | ||
}; | ||
utils_1.addExceptionMechanism(event, { | ||
handled: false, | ||
}); | ||
return event; | ||
}; | ||
function serverlessEventProcessor(event) { | ||
utils_1.addExceptionMechanism(event, { | ||
handled: false, | ||
}); | ||
return event; | ||
} | ||
@@ -34,0 +18,0 @@ exports.serverlessEventProcessor = serverlessEventProcessor; |
@@ -21,4 +21,16 @@ import { captureException, captureMessage, flush, getCurrentHub, Severity, startTransaction, withScope, } from '@sentry/node'; | ||
} | ||
options._metadata = options._metadata || {}; | ||
options._metadata.sdk = { | ||
name: 'sentry.javascript.serverless', | ||
integrations: ['AWSLambda'], | ||
packages: [ | ||
{ | ||
name: 'npm:@sentry/serverless', | ||
version: Sentry.SDK_VERSION, | ||
}, | ||
], | ||
version: Sentry.SDK_VERSION, | ||
}; | ||
Sentry.init(options); | ||
Sentry.addGlobalEventProcessor(serverlessEventProcessor('AWSLambda')); | ||
Sentry.addGlobalEventProcessor(serverlessEventProcessor); | ||
} | ||
@@ -25,0 +37,0 @@ /** */ |
@@ -20,5 +20,17 @@ import * as Sentry from '@sentry/node'; | ||
} | ||
options._metadata = options._metadata || {}; | ||
options._metadata.sdk = { | ||
name: 'sentry.javascript.serverless', | ||
integrations: ['GCPFunction'], | ||
packages: [ | ||
{ | ||
name: 'npm:@sentry/serverless', | ||
version: Sentry.SDK_VERSION, | ||
}, | ||
], | ||
version: Sentry.SDK_VERSION, | ||
}; | ||
Sentry.init(options); | ||
Sentry.addGlobalEventProcessor(serverlessEventProcessor('GCPFunction')); | ||
Sentry.addGlobalEventProcessor(serverlessEventProcessor); | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -11,3 +11,3 @@ /// <reference types="node" /> | ||
*/ | ||
export declare function serverlessEventProcessor(integration: string): (event: Event) => Event; | ||
export declare function serverlessEventProcessor(event: Event): Event; | ||
/** | ||
@@ -21,3 +21,3 @@ * @returns Current active domain with a correct type. | ||
*/ | ||
export declare function domainify<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R; | ||
export declare function domainify<A extends unknown[], R>(fn: (...args: A) => R): (...args: A) => R | void; | ||
/** | ||
@@ -24,0 +24,0 @@ * @param source function to be wrapped |
@@ -1,2 +0,1 @@ | ||
import { SDK_VERSION } from '@sentry/node'; | ||
import { addExceptionMechanism } from '@sentry/utils'; | ||
@@ -11,22 +10,7 @@ import * as domain from 'domain'; | ||
*/ | ||
export function serverlessEventProcessor(integration) { | ||
return event => { | ||
event.sdk = { | ||
...event.sdk, | ||
name: 'sentry.javascript.serverless', | ||
integrations: [...((event.sdk && event.sdk.integrations) || []), integration], | ||
packages: [ | ||
...((event.sdk && event.sdk.packages) || []), | ||
{ | ||
name: 'npm:@sentry/serverless', | ||
version: SDK_VERSION, | ||
}, | ||
], | ||
version: SDK_VERSION, | ||
}; | ||
addExceptionMechanism(event, { | ||
handled: false, | ||
}); | ||
return event; | ||
}; | ||
export function serverlessEventProcessor(event) { | ||
addExceptionMechanism(event, { | ||
handled: false, | ||
}); | ||
return event; | ||
} | ||
@@ -33,0 +17,0 @@ /** |
{ | ||
"name": "@sentry/serverless", | ||
"version": "5.30.0", | ||
"version": "6.0.0", | ||
"description": "Offical Sentry SDK for various serverless solutions", | ||
@@ -19,6 +19,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/minimal": "5.30.0", | ||
"@sentry/node": "5.30.0", | ||
"@sentry/types": "5.30.0", | ||
"@sentry/utils": "5.30.0", | ||
"@sentry/minimal": "6.0.0", | ||
"@sentry/node": "6.0.0", | ||
"@sentry/types": "6.0.0", | ||
"@sentry/utils": "6.0.0", | ||
"@types/aws-lambda": "^8.10.62", | ||
@@ -33,3 +33,3 @@ "@types/express": "^4.17.2", | ||
"@google-cloud/pubsub": "^2.5.0", | ||
"@sentry-internal/eslint-config-sdk": "5.30.0", | ||
"@sentry-internal/eslint-config-sdk": "6.0.0", | ||
"@types/node": "^14.6.4", | ||
@@ -36,0 +36,0 @@ "aws-sdk": "^2.765.0", |
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
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
206072
1975
+ Added@sentry/core@6.0.0(transitive)
+ Added@sentry/hub@6.0.0(transitive)
+ Added@sentry/minimal@6.0.0(transitive)
+ Added@sentry/node@6.0.0(transitive)
+ Added@sentry/tracing@6.0.0(transitive)
+ Added@sentry/types@6.0.0(transitive)
+ Added@sentry/utils@6.0.0(transitive)
- Removed@sentry/core@5.30.0(transitive)
- Removed@sentry/hub@5.30.0(transitive)
- Removed@sentry/minimal@5.30.0(transitive)
- Removed@sentry/node@5.30.0(transitive)
- Removed@sentry/tracing@5.30.0(transitive)
- Removed@sentry/types@5.30.0(transitive)
- Removed@sentry/utils@5.30.0(transitive)
Updated@sentry/minimal@6.0.0
Updated@sentry/node@6.0.0
Updated@sentry/types@6.0.0
Updated@sentry/utils@6.0.0