@sentry/google-cloud-serverless 9.39.0 → 9.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/gcpfunction/cloud_events.js +1 -1
- package/build/cjs/gcpfunction/cloud_events.js.map +1 -1
- package/build/cjs/gcpfunction/events.js +1 -1
- package/build/cjs/gcpfunction/events.js.map +1 -1
- package/build/cjs/gcpfunction/http.js +1 -1
- package/build/cjs/gcpfunction/http.js.map +1 -1
- package/build/cjs/index.js +1 -0
- package/build/cjs/index.js.map +1 -1
- package/build/esm/gcpfunction/cloud_events.js +2 -2
- package/build/esm/gcpfunction/cloud_events.js.map +1 -1
- package/build/esm/gcpfunction/events.js +2 -2
- package/build/esm/gcpfunction/events.js.map +1 -1
- package/build/esm/gcpfunction/http.js +2 -2
- package/build/esm/gcpfunction/http.js.map +1 -1
- package/build/esm/index.js +1 -1
- package/build/esm/package.json +1 -1
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +1 -1
- package/package.json +3 -3
|
@@ -50,7 +50,7 @@ function _wrapCloudEventFunction(
|
|
|
50
50
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
51
51
|
node.flush(options.flushTimeout)
|
|
52
52
|
.then(null, e => {
|
|
53
|
-
debugBuild.DEBUG_BUILD && core.
|
|
53
|
+
debugBuild.DEBUG_BUILD && core.debug.error(e);
|
|
54
54
|
})
|
|
55
55
|
.then(() => {
|
|
56
56
|
if (typeof callback === 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud_events.js","sources":["../../../src/gcpfunction/cloud_events.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"cloud_events.js","sources":["../../../src/gcpfunction/cloud_events.ts"],"sourcesContent":["import {\n debug,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, markEventUnhandled, proxyFunction } from '../utils';\nimport type { CloudEventFunction, CloudEventFunctionWithCallback, WrapperOptions } from './general';\n\nexport type CloudEventFunctionWrapperOptions = WrapperOptions;\n\n/**\n * Wraps an event function handler adding it error capture and tracing capabilities.\n *\n * @param fn Event handler\n * @param options Options\n * @returns Event handler\n */\nexport function wrapCloudEventFunction(\n fn: CloudEventFunction | CloudEventFunctionWithCallback,\n wrapOptions: Partial<CloudEventFunctionWrapperOptions> = {},\n): CloudEventFunctionWithCallback {\n return proxyFunction(fn, f => domainify(_wrapCloudEventFunction(f, wrapOptions)));\n}\n\nfunction _wrapCloudEventFunction(\n fn: CloudEventFunction | CloudEventFunctionWithCallback,\n wrapOptions: Partial<CloudEventFunctionWrapperOptions> = {},\n): CloudEventFunctionWithCallback {\n const options: CloudEventFunctionWrapperOptions = {\n flushTimeout: 2000,\n ...wrapOptions,\n };\n return (context, callback) => {\n return startSpanManual(\n {\n name: context.type || '<unknown>',\n op: 'function.gcp.cloud_event',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_cloud_event',\n },\n },\n span => {\n const scope = getCurrentScope();\n scope.setContext('gcp.function.context', { ...context });\n\n const newCallback = domainify((...args: unknown[]) => {\n if (args[0] !== null && args[0] !== undefined) {\n captureException(args[0], scope => markEventUnhandled(scope));\n }\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n flush(options.flushTimeout)\n .then(null, e => {\n DEBUG_BUILD && debug.error(e);\n })\n .then(() => {\n if (typeof callback === 'function') {\n callback(...args);\n }\n });\n });\n\n if (fn.length > 1) {\n return handleCallbackErrors(\n () => (fn as CloudEventFunctionWithCallback)(context, newCallback),\n err => {\n captureException(err, scope => markEventUnhandled(scope));\n },\n );\n }\n\n return Promise.resolve()\n .then(() => (fn as CloudEventFunction)(context))\n .then(\n result => newCallback(null, result),\n err => newCallback(err, undefined),\n );\n },\n );\n };\n}\n"],"names":["proxyFunction","domainify","startSpanManual","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","getCurrentScope","captureException","markEventUnhandled","flush","DEBUG_BUILD","debug","handleCallbackErrors"],"mappings":";;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,sBAAsB;AACtC,EAAE,EAAE;AACJ,EAAE,WAAW,GAA8C,EAAE;AAC7D,EAAkC;AAClC,EAAE,OAAOA,mBAAa,CAAC,EAAE,EAAE,KAAKC,eAAS,CAAC,uBAAuB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AACnF;;AAEA,SAAS,uBAAuB;AAChC,EAAE,EAAE;AACJ,EAAE,WAAW,GAA8C,EAAE;AAC7D,EAAkC;AAClC,EAAE,MAAM,OAAO,GAAqC;AACpD,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,GAAG,WAAW;AAClB,GAAG;AACH,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,KAAK;AAChC,IAAI,OAAOC,oBAAe;AAC1B,MAAM;AACN,QAAQ,IAAI,EAAE,OAAO,CAAC,IAAA,IAAQ,WAAW;AACzC,QAAQ,EAAE,EAAE,0BAA0B;AACtC,QAAQ,UAAU,EAAE;AACpB,UAAU,CAACC,qCAAgC,GAAG,WAAW;AACzD,UAAU,CAACC,qCAAgC,GAAG,0CAA0C;AACxF,SAAS;AACT,OAAO;AACP,MAAM,QAAQ;AACd,QAAQ,MAAM,KAAA,GAAQC,oBAAe,EAAE;AACvC,QAAQ,KAAK,CAAC,UAAU,CAAC,sBAAsB,EAAE,EAAE,GAAG,OAAA,EAAS,CAAC;;AAEhE,QAAQ,MAAM,cAAcJ,eAAS,CAAC,CAAC,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int/no-floating-promises
|
|
54
54
|
node.flush(options.flushTimeout)
|
|
55
55
|
.then(null, e => {
|
|
56
|
-
debugBuild.DEBUG_BUILD && core.
|
|
56
|
+
debugBuild.DEBUG_BUILD && core.debug.error(e);
|
|
57
57
|
})
|
|
58
58
|
.then(() => {
|
|
59
59
|
if (typeof callback === 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sources":["../../../src/gcpfunction/events.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"events.js","sources":["../../../src/gcpfunction/events.ts"],"sourcesContent":["import {\n debug,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, markEventUnhandled, proxyFunction } from '../utils';\nimport type { EventFunction, EventFunctionWithCallback, WrapperOptions } from './general';\n\nexport type EventFunctionWrapperOptions = WrapperOptions;\n\n/**\n * Wraps an event function handler adding it error capture and tracing capabilities.\n *\n * @param fn Event handler\n * @param options Options\n * @returns Event handler\n */\nexport function wrapEventFunction(\n fn: EventFunction | EventFunctionWithCallback,\n wrapOptions: Partial<EventFunctionWrapperOptions> = {},\n): EventFunctionWithCallback {\n return proxyFunction(fn, f => domainify(_wrapEventFunction(f, wrapOptions)));\n}\n\n/** */\nfunction _wrapEventFunction<F extends EventFunction | EventFunctionWithCallback>(\n fn: F,\n wrapOptions: Partial<EventFunctionWrapperOptions> = {},\n): (...args: Parameters<F>) => ReturnType<F> | Promise<void> {\n const options: EventFunctionWrapperOptions = {\n flushTimeout: 2000,\n ...wrapOptions,\n };\n return (...eventFunctionArguments: Parameters<F>): ReturnType<F> | Promise<void> => {\n const [data, context, callback] = eventFunctionArguments;\n\n return startSpanManual(\n {\n name: context.eventType,\n op: 'function.gcp.event',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_event',\n },\n },\n span => {\n const scope = getCurrentScope();\n scope.setContext('gcp.function.context', { ...context });\n\n const newCallback = domainify((...args: unknown[]) => {\n if (args[0] !== null && args[0] !== undefined) {\n captureException(args[0], scope => markEventUnhandled(scope));\n }\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n flush(options.flushTimeout)\n .then(null, e => {\n DEBUG_BUILD && debug.error(e);\n })\n .then(() => {\n if (typeof callback === 'function') {\n callback(...args);\n }\n });\n });\n\n if (fn.length > 2) {\n return handleCallbackErrors(\n () => (fn as EventFunctionWithCallback)(data, context, newCallback),\n err => {\n captureException(err, scope => markEventUnhandled(scope));\n },\n );\n }\n\n return Promise.resolve()\n .then(() => (fn as EventFunction)(data, context))\n .then(\n result => newCallback(null, result),\n err => newCallback(err, undefined),\n );\n },\n );\n };\n}\n"],"names":["proxyFunction","domainify","startSpanManual","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","getCurrentScope","captureException","markEventUnhandled","flush","DEBUG_BUILD","debug","handleCallbackErrors"],"mappings":";;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB;AACjC,EAAE,EAAE;AACJ,EAAE,WAAW,GAAyC,EAAE;AACxD,EAA6B;AAC7B,EAAE,OAAOA,mBAAa,CAAC,EAAE,EAAE,KAAKC,eAAS,CAAC,kBAAkB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AAC9E;;AAEA;AACA,SAAS,kBAAkB;AAC3B,EAAE,EAAE;AACJ,EAAE,WAAW,GAAyC,EAAE;AACxD,EAA6D;AAC7D,EAAE,MAAM,OAAO,GAAgC;AAC/C,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,GAAG,WAAW;AAClB,GAAG;AACH,EAAE,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C,YAAY,MAAM,CAAC,EAAA,GAAiC,IAAI,EAAE,OAAO,EAAE,WAAW,CAAC;AAC/E,YAAY,OAAO;AACnB,cAAcL,qBAAgB,CAAC,GAAG,EAAE,KAAA,IAASC,wBAAkB,CAAC,KAAK,CAAC,CAAC;AACvE,aAAa;AACb,WAAW;AACX;;AAEA,QAAQ,OAAO,OAAO,CAAC,OAAO;AAC9B,WAAW,IAAI,CAAC,MAAM,CAAC,EAAA,GAAqB,IAAI,EAAE,OAAO,CAAC;AAC1D,WAAW,IAAI;AACf,YAAY,UAAU,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;AAC/C,YAAY,OAAO,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC;AAC9C,WAAW;AACX,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;"}
|
|
@@ -60,7 +60,7 @@ function _wrapHttpFunction(fn, options) {
|
|
|
60
60
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
61
61
|
node.flush(flushTimeout)
|
|
62
62
|
.then(null, e => {
|
|
63
|
-
debugBuild.DEBUG_BUILD && core.
|
|
63
|
+
debugBuild.DEBUG_BUILD && core.debug.error(e);
|
|
64
64
|
})
|
|
65
65
|
.then(() => {
|
|
66
66
|
_end.call(this, chunk, encoding, cb);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../src/gcpfunction/http.ts"],"sourcesContent":["import {\n handleCallbackErrors,\n httpRequestToRequestData,\n isString,\n
|
|
1
|
+
{"version":3,"file":"http.js","sources":["../../../src/gcpfunction/http.ts"],"sourcesContent":["import {\n debug,\n handleCallbackErrors,\n httpRequestToRequestData,\n isString,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n setHttpStatus,\n stripUrlQueryAndFragment,\n} from '@sentry/core';\nimport { captureException, continueTrace, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, markEventUnhandled, proxyFunction } from '../utils';\nimport type { HttpFunction, WrapperOptions } from './general';\n\n/**\n * Wraps an HTTP function handler adding it error capture and tracing capabilities.\n *\n * @param fn HTTP Handler\n * @param options Options\n * @returns HTTP handler\n */\nexport function wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial<WrapperOptions> = {}): HttpFunction {\n const wrap = (f: HttpFunction): HttpFunction => domainify(_wrapHttpFunction(f, wrapOptions));\n\n let overrides: Record<PropertyKey, unknown> | undefined;\n\n // Functions emulator from firebase-tools has a hack-ish workaround that saves the actual function\n // passed to `onRequest(...)` and in fact runs it so we need to wrap it too.\n const emulatorFunc = (fn as HttpFunction & { __emulator_func?: HttpFunction }).__emulator_func;\n if (emulatorFunc) {\n overrides = { __emulator_func: proxyFunction(emulatorFunc, wrap) };\n }\n return proxyFunction(fn, wrap, overrides);\n}\n\n/** */\nfunction _wrapHttpFunction(fn: HttpFunction, options: Partial<WrapperOptions>): HttpFunction {\n const flushTimeout = options.flushTimeout || 2000;\n return (req, res) => {\n const reqMethod = (req.method || '').toUpperCase();\n const reqUrl = stripUrlQueryAndFragment(req.originalUrl || req.url || '');\n\n const sentryTrace = req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined;\n const baggage = req.headers?.baggage;\n\n return continueTrace({ sentryTrace, baggage }, () => {\n const normalizedRequest = httpRequestToRequestData(req);\n getCurrentScope().setSDKProcessingMetadata({ normalizedRequest });\n\n return startSpanManual(\n {\n name: `${reqMethod} ${reqUrl}`,\n op: 'function.gcp.http',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',\n },\n },\n span => {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _end = res.end;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): any {\n setHttpStatus(span, res.statusCode);\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n flush(flushTimeout)\n .then(null, e => {\n DEBUG_BUILD && debug.error(e);\n })\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n });\n };\n\n return handleCallbackErrors(\n () => fn(req, res),\n err => {\n captureException(err, scope => markEventUnhandled(scope));\n },\n );\n },\n );\n });\n };\n}\n"],"names":["domainify","proxyFunction","stripUrlQueryAndFragment","isString","continueTrace","httpRequestToRequestData","getCurrentScope","startSpanManual","SEMANTIC_ATTRIBUTE_SENTRY_SOURCE","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","setHttpStatus","flush","DEBUG_BUILD","debug","handleCallbackErrors","captureException","markEventUnhandled"],"mappings":";;;;;;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,EAAE,EAAgB,WAAW,GAA4B,EAAE,EAAgB;AAC5G,EAAE,MAAM,IAAA,GAAO,CAAC,CAAC,KAAiCA,eAAS,CAAC,iBAAiB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;;AAE9F,EAAE,IAAI,SAAS;;AAEf;AACA;AACA,EAAE,MAAM,YAAA,GAAe,CAAC,EAAA,GAAyD,eAAe;AAChG,EAAE,IAAI,YAAY,EAAE;AACpB,IAAI,SAAA,GAAY,EAAE,eAAe,EAAEC,mBAAa,CAAC,YAAY,EAAE,IAAI,CAAA,EAAG;AACtE;AACA,EAAE,OAAOA,mBAAa,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC;AAC3C;;AAEA;AACA,SAAS,iBAAiB,CAAC,EAAE,EAAgB,OAAO,EAAyC;AAC7F,EAAE,MAAM,YAAA,GAAe,OAAO,CAAC,YAAA,IAAgB,IAAI;AACnD,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,KAAK;AACvB,IAAI,MAAM,SAAA,GAAY,CAAC,GAAG,CAAC,MAAA,IAAU,EAAE,EAAE,WAAW,EAAE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AAA,CAAA,MAAA;AACA,gBAAA,IAAA,CAAA,IAAA,CAAA,IAAA,EAAA,KAAA,EAAA,QAAA,EAAA,EAAA,CAAA;AACA,eAAA,CAAA;AACA,WAAA;;AAEA,UAAA,OAAAC,yBAAA;AACA,YAAA,MAAA,EAAA,CAAA,GAAA,EAAA,GAAA,CAAA;AACA,YAAA,GAAA,IAAA;AACA,cAAAC,qBAAA,CAAA,GAAA,EAAA,KAAA,IAAAC,wBAAA,CAAA,KAAA,CAAA,CAAA;AACA,aAAA;AACA,WAAA;AACA,SAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA;;;;"}
|
package/build/cjs/index.js
CHANGED
|
@@ -96,6 +96,7 @@ exports.nativeNodeFetchIntegration = node.nativeNodeFetchIntegration;
|
|
|
96
96
|
exports.nodeContextIntegration = node.nodeContextIntegration;
|
|
97
97
|
exports.onUncaughtExceptionIntegration = node.onUncaughtExceptionIntegration;
|
|
98
98
|
exports.onUnhandledRejectionIntegration = node.onUnhandledRejectionIntegration;
|
|
99
|
+
exports.openAIIntegration = node.openAIIntegration;
|
|
99
100
|
exports.openFeatureIntegration = node.openFeatureIntegration;
|
|
100
101
|
exports.parameterize = node.parameterize;
|
|
101
102
|
exports.postgresIntegration = node.postgresIntegration;
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, handleCallbackErrors,
|
|
1
|
+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, handleCallbackErrors, debug } from '@sentry/core';
|
|
2
2
|
import { startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node';
|
|
3
3
|
import { DEBUG_BUILD } from '../debug-build.js';
|
|
4
4
|
import { proxyFunction, domainify, markEventUnhandled } from '../utils.js';
|
|
@@ -48,7 +48,7 @@ function _wrapCloudEventFunction(
|
|
|
48
48
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
49
49
|
flush(options.flushTimeout)
|
|
50
50
|
.then(null, e => {
|
|
51
|
-
DEBUG_BUILD &&
|
|
51
|
+
DEBUG_BUILD && debug.error(e);
|
|
52
52
|
})
|
|
53
53
|
.then(() => {
|
|
54
54
|
if (typeof callback === 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud_events.js","sources":["../../../src/gcpfunction/cloud_events.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"cloud_events.js","sources":["../../../src/gcpfunction/cloud_events.ts"],"sourcesContent":["import {\n debug,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, markEventUnhandled, proxyFunction } from '../utils';\nimport type { CloudEventFunction, CloudEventFunctionWithCallback, WrapperOptions } from './general';\n\nexport type CloudEventFunctionWrapperOptions = WrapperOptions;\n\n/**\n * Wraps an event function handler adding it error capture and tracing capabilities.\n *\n * @param fn Event handler\n * @param options Options\n * @returns Event handler\n */\nexport function wrapCloudEventFunction(\n fn: CloudEventFunction | CloudEventFunctionWithCallback,\n wrapOptions: Partial<CloudEventFunctionWrapperOptions> = {},\n): CloudEventFunctionWithCallback {\n return proxyFunction(fn, f => domainify(_wrapCloudEventFunction(f, wrapOptions)));\n}\n\nfunction _wrapCloudEventFunction(\n fn: CloudEventFunction | CloudEventFunctionWithCallback,\n wrapOptions: Partial<CloudEventFunctionWrapperOptions> = {},\n): CloudEventFunctionWithCallback {\n const options: CloudEventFunctionWrapperOptions = {\n flushTimeout: 2000,\n ...wrapOptions,\n };\n return (context, callback) => {\n return startSpanManual(\n {\n name: context.type || '<unknown>',\n op: 'function.gcp.cloud_event',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_cloud_event',\n },\n },\n span => {\n const scope = getCurrentScope();\n scope.setContext('gcp.function.context', { ...context });\n\n const newCallback = domainify((...args: unknown[]) => {\n if (args[0] !== null && args[0] !== undefined) {\n captureException(args[0], scope => markEventUnhandled(scope));\n }\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n flush(options.flushTimeout)\n .then(null, e => {\n DEBUG_BUILD && debug.error(e);\n })\n .then(() => {\n if (typeof callback === 'function') {\n callback(...args);\n }\n });\n });\n\n if (fn.length > 1) {\n return handleCallbackErrors(\n () => (fn as CloudEventFunctionWithCallback)(context, newCallback),\n err => {\n captureException(err, scope => markEventUnhandled(scope));\n },\n );\n }\n\n return Promise.resolve()\n .then(() => (fn as CloudEventFunction)(context))\n .then(\n result => newCallback(null, result),\n err => newCallback(err, undefined),\n );\n },\n );\n };\n}\n"],"names":[],"mappings":";;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,sBAAsB;AACtC,EAAE,EAAE;AACJ,EAAE,WAAW,GAA8C,EAAE;AAC7D,EAAkC;AAClC,EAAE,OAAO,aAAa,CAAC,EAAE,EAAE,KAAK,SAAS,CAAC,uBAAuB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AACnF;;AAEA,SA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AC;AACd,SAAS,CAAC;;AAEV,QAAQ,IAAI,EAAE,CAAC,MAAA,GAAS,CAAC,EAAE;AAC3B,UAAU,OAAO,oBAAoB;AACrC,YAAY,MAAM,CAAC,EAAA,GAAsC,OAAO,EAAE,WAAW,CAAC;AAC9E,YAAY,OAAO;AACnB,cAAc,gBAAgB,CAAC,GAAG,EAAE,KAAA,IAAS,kBAAkB,CAAC,KAAK,CAAC,CAAC;AACvE,aAAa;AACb,WAAW;AACX;;AAEA,QAAQ,OAAO,OAAO,CAAC,OAAO;AAC9B,WAAW,IAAI,CAAC,MAAM,CAAC,EAAA,GAA0B,OAAO,CAAC;AACzD,WAAW,IAAI;AACf,YAAY,UAAU,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC;AAC/C,YAAY,OAAO,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC;AAC9C,WAAW;AACX,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, handleCallbackErrors,
|
|
1
|
+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, handleCallbackErrors, debug } from '@sentry/core';
|
|
2
2
|
import { startSpanManual, getCurrentScope, captureException, flush } from '@sentry/node';
|
|
3
3
|
import { DEBUG_BUILD } from '../debug-build.js';
|
|
4
4
|
import { proxyFunction, domainify, markEventUnhandled } from '../utils.js';
|
|
@@ -51,7 +51,7 @@ function _wrapEventFunction(
|
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
52
52
|
flush(options.flushTimeout)
|
|
53
53
|
.then(null, e => {
|
|
54
|
-
DEBUG_BUILD &&
|
|
54
|
+
DEBUG_BUILD && debug.error(e);
|
|
55
55
|
})
|
|
56
56
|
.then(() => {
|
|
57
57
|
if (typeof callback === 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sources":["../../../src/gcpfunction/events.ts"],"sourcesContent":["import {\n
|
|
1
|
+
{"version":3,"file":"events.js","sources":["../../../src/gcpfunction/events.ts"],"sourcesContent":["import {\n debug,\n handleCallbackErrors,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, markEventUnhandled, proxyFunction } from '../utils';\nimport type { EventFunction, EventFunctionWithCallback, WrapperOptions } from './general';\n\nexport type EventFunctionWrapperOptions = WrapperOptions;\n\n/**\n * Wraps an event function handler adding it error capture and tracing capabilities.\n *\n * @param fn Event handler\n * @param options Options\n * @returns Event handler\n */\nexport function wrapEventFunction(\n fn: EventFunction | EventFunctionWithCallback,\n wrapOptions: Partial<EventFunctionWrapperOptions> = {},\n): EventFunctionWithCallback {\n return proxyFunction(fn, f => domainify(_wrapEventFunction(f, wrapOptions)));\n}\n\n/** */\nfunction _wrapEventFunction<F extends EventFunction | EventFunctionWithCallback>(\n fn: F,\n wrapOptions: Partial<EventFunctionWrapperOptions> = {},\n): (...args: Parameters<F>) => ReturnType<F> | Promise<void> {\n const options: EventFunctionWrapperOptions = {\n flushTimeout: 2000,\n ...wrapOptions,\n };\n return (...eventFunctionArguments: Parameters<F>): ReturnType<F> | Promise<void> => {\n const [data, context, callback] = eventFunctionArguments;\n\n return startSpanManual(\n {\n name: context.eventType,\n op: 'function.gcp.event',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'component',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_event',\n },\n },\n span => {\n const scope = getCurrentScope();\n scope.setContext('gcp.function.context', { ...context });\n\n const newCallback = domainify((...args: unknown[]) => {\n if (args[0] !== null && args[0] !== undefined) {\n captureException(args[0], scope => markEventUnhandled(scope));\n }\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n flush(options.flushTimeout)\n .then(null, e => {\n DEBUG_BUILD && debug.error(e);\n })\n .then(() => {\n if (typeof callback === 'function') {\n callback(...args);\n }\n });\n });\n\n if (fn.length > 2) {\n return handleCallbackErrors(\n () => (fn as EventFunctionWithCallback)(data, context, newCallback),\n err => {\n captureException(err, scope => markEventUnhandled(scope));\n },\n );\n }\n\n return Promise.resolve()\n .then(() => (fn as EventFunction)(data, context))\n .then(\n result => newCallback(null, result),\n err => newCallback(err, undefined),\n );\n },\n );\n };\n}\n"],"names":[],"mappings":";;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,iBAAiB;AACjC,EAAE,EAAE;AACJ,EAAE,WAAW,GAAyC,EAAE;AACxD,EAA6B;AAC7B,EAAE,OAAO,aAAa,CAAC,EAAE,EAAE,KAAK,SAAS,CAAC,kBAAkB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC;AAC9E;;AAEA;AACA,SAAS,kBAAkB;AAC3B,EAAE,EAAE;AACJ,EAAE,WAAW,GAAyC,EAAE;AACxD,EAA6D;AAC7D,EAAE,MAAM,OAAO,GAAgC;AAC/C,IAAI,YAAY,EAAE,IAAI;AACtB,IAAI,GAAG,WAAW;AAClB,GAAG;AACH,EAAE,OAAO,CAAC,GAAG,sBAAsB,KAAmD;AACtF,IAAI,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAA,GAAI,sBAAsB;;AAE5D,IAAI,OAAO,eAAe;AAC1B,MAAM;AACN,QAAQ,IAAI,EAAE,OAAO,CAAC,SAAS;AAC/B,QAAQ,EAAE,EAAE,oBAAoB;AAChC,QAAQ,UAAU,EAAE;AACpB,UAAU,CAAC,gCAAgC,GAAG,WAAW;AACzD,UAAU,CAAC,gCAAgC,GAAG,oCAAoC;AAClF,SAAS;AACT,OAAO;AACP,MAAM,QAAQ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C;AAC/C,YAAY,OAAO,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC;AAC9C,WAAW;AACX,OAAO;AACP,KAAK;AACL,GAAG;AACH;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stripUrlQueryAndFragment, isString, httpRequestToRequestData, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, setHttpStatus,
|
|
1
|
+
import { stripUrlQueryAndFragment, isString, httpRequestToRequestData, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, setHttpStatus, debug, handleCallbackErrors } from '@sentry/core';
|
|
2
2
|
import { continueTrace, getCurrentScope, startSpanManual, flush, captureException } from '@sentry/node';
|
|
3
3
|
import { DEBUG_BUILD } from '../debug-build.js';
|
|
4
4
|
import { proxyFunction, domainify, markEventUnhandled } from '../utils.js';
|
|
@@ -58,7 +58,7 @@ function _wrapHttpFunction(fn, options) {
|
|
|
58
58
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
59
59
|
flush(flushTimeout)
|
|
60
60
|
.then(null, e => {
|
|
61
|
-
DEBUG_BUILD &&
|
|
61
|
+
DEBUG_BUILD && debug.error(e);
|
|
62
62
|
})
|
|
63
63
|
.then(() => {
|
|
64
64
|
_end.call(this, chunk, encoding, cb);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../src/gcpfunction/http.ts"],"sourcesContent":["import {\n handleCallbackErrors,\n httpRequestToRequestData,\n isString,\n
|
|
1
|
+
{"version":3,"file":"http.js","sources":["../../../src/gcpfunction/http.ts"],"sourcesContent":["import {\n debug,\n handleCallbackErrors,\n httpRequestToRequestData,\n isString,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n setHttpStatus,\n stripUrlQueryAndFragment,\n} from '@sentry/core';\nimport { captureException, continueTrace, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, markEventUnhandled, proxyFunction } from '../utils';\nimport type { HttpFunction, WrapperOptions } from './general';\n\n/**\n * Wraps an HTTP function handler adding it error capture and tracing capabilities.\n *\n * @param fn HTTP Handler\n * @param options Options\n * @returns HTTP handler\n */\nexport function wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial<WrapperOptions> = {}): HttpFunction {\n const wrap = (f: HttpFunction): HttpFunction => domainify(_wrapHttpFunction(f, wrapOptions));\n\n let overrides: Record<PropertyKey, unknown> | undefined;\n\n // Functions emulator from firebase-tools has a hack-ish workaround that saves the actual function\n // passed to `onRequest(...)` and in fact runs it so we need to wrap it too.\n const emulatorFunc = (fn as HttpFunction & { __emulator_func?: HttpFunction }).__emulator_func;\n if (emulatorFunc) {\n overrides = { __emulator_func: proxyFunction(emulatorFunc, wrap) };\n }\n return proxyFunction(fn, wrap, overrides);\n}\n\n/** */\nfunction _wrapHttpFunction(fn: HttpFunction, options: Partial<WrapperOptions>): HttpFunction {\n const flushTimeout = options.flushTimeout || 2000;\n return (req, res) => {\n const reqMethod = (req.method || '').toUpperCase();\n const reqUrl = stripUrlQueryAndFragment(req.originalUrl || req.url || '');\n\n const sentryTrace = req.headers && isString(req.headers['sentry-trace']) ? req.headers['sentry-trace'] : undefined;\n const baggage = req.headers?.baggage;\n\n return continueTrace({ sentryTrace, baggage }, () => {\n const normalizedRequest = httpRequestToRequestData(req);\n getCurrentScope().setSDKProcessingMetadata({ normalizedRequest });\n\n return startSpanManual(\n {\n name: `${reqMethod} ${reqUrl}`,\n op: 'function.gcp.http',\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',\n },\n },\n span => {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const _end = res.end;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n res.end = function (chunk?: any | (() => void), encoding?: string | (() => void), cb?: () => void): any {\n setHttpStatus(span, res.statusCode);\n span.end();\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n flush(flushTimeout)\n .then(null, e => {\n DEBUG_BUILD && debug.error(e);\n })\n .then(() => {\n _end.call(this, chunk, encoding, cb);\n });\n };\n\n return handleCallbackErrors(\n () => fn(req, res),\n err => {\n captureException(err, scope => markEventUnhandled(scope));\n },\n );\n },\n );\n });\n };\n}\n"],"names":[],"mappings":";;;;;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,EAAE,EAAgB,WAAW,GAA4B,EAAE,EAAgB;AAC5G,EAAE,MAAM,IAAA,GAAO,CAAC,CAAC,KAAiC,SAAS,CAAC,iBAAiB,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;;AAE9F,EAAE,IAAI,SAAS;;AAEf;AACA;AACA,EAAE,MAAM,YAAA,GAAe,CAAC,EAAA,GAAyD,eAAe;AAChG,EAAE,IAAI,YAAY,EAAE;AACpB,IAAI,SAAA,GAAY,EAAE,eAAe,EAAE,aAAa,CAAC,YAAY,EAAE,IAAI,CAAA,EAAG;AACtE;AACA,EAAE,OAAO,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,CAAC;AAC3C;;AAEA;AACA,SAAS,iBAAiB,CAAC,EAAE,EAAgB,OAAO,EAAyC;AAC7F,EAAE,MAAM,YAAA,GAAe,OAAO,CAAC,YAAA,IAAgB,IAAI;AACnD,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,KAAK;AACvB,IAAI,MAAM,SAAA,GAAY,CAAC,GAAG,CAAC,MAAA,IAAU,EAAE,EAAE,WAAW,EAAE;AACtD,IAAI,MAAM,MAAA,GAAS,wBAAwB,CAAC,GAAG,CAAC,WAAA,IAAe,GAAG,CAAC,GAAA,IAAO,EAAE,CAAC;;AAE7E,IAAI,MAAM,WAAA,GAAc,GAAG,CAA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AAA,EAAA,CAAA,GAAA,EAAA,GAAA,CAAA;AACA,YAAA,GAAA,IAAA;AACA,cAAA,gBAAA,CAAA,GAAA,EAAA,KAAA,IAAA,kBAAA,CAAA,KAAA,CAAA,CAAA;AACA,aAAA;AACA,WAAA;AACA,SAAA;AACA,OAAA;AACA,KAAA,CAAA;AACA,GAAA;AACA;;;;"}
|
package/build/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { NODE_VERSION, NodeClient, OpenFeatureIntegrationHook, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, buildLaunchDarklyFlagUsedHandler, captureCheckIn, captureEvent, captureException, captureFeedback, captureMessage, captureSession, childProcessIntegration, close, connectIntegration, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dataloaderIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, fastifyIntegration, featureFlagsIntegration, flush, fsIntegration, functionToStringIntegration, generateInstrumentOnce, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTraceData, getTraceMetaTags, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, launchDarklyIntegration, linkedErrorsIntegration, localVariablesIntegration, logger, lruMemoizerIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openFeatureIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, profiler, redisIntegration, requestDataIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, statsigIntegration, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, unleashIntegration, updateSpanName, vercelAIIntegration, withActiveSpan, withIsolationScope, withMonitor, withScope, wrapMcpServerWithSentry, zodErrorsIntegration } from '@sentry/node';
|
|
1
|
+
export { NODE_VERSION, NodeClient, OpenFeatureIntegrationHook, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, Scope, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, buildLaunchDarklyFlagUsedHandler, captureCheckIn, captureEvent, captureException, captureFeedback, captureMessage, captureSession, childProcessIntegration, close, connectIntegration, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createGetModuleFromFilename, createSentryWinstonTransport, createTransport, cron, dataloaderIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eventFiltersIntegration, expressErrorHandler, expressIntegration, fastifyIntegration, featureFlagsIntegration, flush, fsIntegration, functionToStringIntegration, generateInstrumentOnce, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getGlobalScope, getIsolationScope, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTraceData, getTraceMetaTags, graphqlIntegration, hapiIntegration, httpIntegration, inboundFiltersIntegration, initOpenTelemetry, instrumentSupabaseClient, isEnabled, isInitialized, kafkaIntegration, knexIntegration, koaIntegration, lastEventId, launchDarklyIntegration, linkedErrorsIntegration, localVariablesIntegration, logger, lruMemoizerIntegration, makeNodeTransport, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, nodeContextIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openAIIntegration, openFeatureIntegration, parameterize, postgresIntegration, postgresJsIntegration, prismaIntegration, profiler, redisIntegration, requestDataIntegration, setContext, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupConnectErrorHandler, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanToBaggageHeader, spanToJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, statsigIntegration, supabaseIntegration, suppressTracing, tediousIntegration, trpcMiddleware, unleashIntegration, updateSpanName, vercelAIIntegration, withActiveSpan, withIsolationScope, withMonitor, withScope, wrapMcpServerWithSentry, zodErrorsIntegration } from '@sentry/node';
|
|
2
2
|
export { captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration } from '@sentry/core';
|
|
3
3
|
export { getDefaultIntegrations, init } from './sdk.js';
|
|
4
4
|
export { googleCloudHttpIntegration } from './integrations/google-cloud-http.js';
|
package/build/esm/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"module","version":"9.
|
|
1
|
+
{"type":"module","version":"9.41.0","sideEffects":false}
|
package/build/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureCheckIn, captureFeedback, startSession, captureSession, endSession, withMonitor, createTransport, getClient, isInitialized, isEnabled, generateInstrumentOnce, getCurrentScope, getGlobalScope, getIsolationScope, getTraceData, getTraceMetaTags, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, makeNodeTransport, NodeClient, defaultStackParser, lastEventId, flush, close, getSentryRelease, createGetModuleFromFilename, anrIntegration, disableAnrDetectionForCallback, consoleIntegration, httpIntegration, nativeNodeFetchIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, requestDataIntegration, fsIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getRootSpan, getSpanDescendants, continueTrace, getAutoPerformanceIntegrations, cron, parameterize, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, dataloaderIntegration, expressIntegration, expressErrorHandler, setupExpressErrorHandler, koaIntegration, setupKoaErrorHandler, connectIntegration, setupConnectErrorHandler, fastifyIntegration, genericPoolIntegration, graphqlIntegration, knexIntegration, kafkaIntegration, lruMemoizerIntegration, mongoIntegration, mongooseIntegration, mysqlIntegration, mysql2Integration, redisIntegration, tediousIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, hapiIntegration, setupHapiErrorHandler, spotlightIntegration, initOpenTelemetry, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, profiler, amqplibIntegration, childProcessIntegration, createSentryWinstonTransport, vercelAIIntegration, logger, consoleLoggingIntegration, wrapMcpServerWithSentry, NODE_VERSION, featureFlagsIntegration, type FeatureFlagsIntegration, launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, } from '@sentry/node';
|
|
1
|
+
export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureCheckIn, captureFeedback, startSession, captureSession, endSession, withMonitor, createTransport, getClient, isInitialized, isEnabled, generateInstrumentOnce, getCurrentScope, getGlobalScope, getIsolationScope, getTraceData, getTraceMetaTags, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, makeNodeTransport, NodeClient, defaultStackParser, lastEventId, flush, close, getSentryRelease, createGetModuleFromFilename, anrIntegration, disableAnrDetectionForCallback, consoleIntegration, httpIntegration, nativeNodeFetchIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openAIIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, requestDataIntegration, fsIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getRootSpan, getSpanDescendants, continueTrace, getAutoPerformanceIntegrations, cron, parameterize, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, dataloaderIntegration, expressIntegration, expressErrorHandler, setupExpressErrorHandler, koaIntegration, setupKoaErrorHandler, connectIntegration, setupConnectErrorHandler, fastifyIntegration, genericPoolIntegration, graphqlIntegration, knexIntegration, kafkaIntegration, lruMemoizerIntegration, mongoIntegration, mongooseIntegration, mysqlIntegration, mysql2Integration, redisIntegration, tediousIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, hapiIntegration, setupHapiErrorHandler, spotlightIntegration, initOpenTelemetry, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, profiler, amqplibIntegration, childProcessIntegration, createSentryWinstonTransport, vercelAIIntegration, logger, consoleLoggingIntegration, wrapMcpServerWithSentry, NODE_VERSION, featureFlagsIntegration, type FeatureFlagsIntegration, launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, } from '@sentry/node';
|
|
2
2
|
export { captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, } from '@sentry/core';
|
|
3
3
|
export { getDefaultIntegrations, init } from './sdk';
|
|
4
4
|
export { googleCloudHttpIntegration } from './integrations/google-cloud-http';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,SAAS,EACT,aAAa,EACb,SAAS,EACT,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,yBAAyB,EACzB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,KAAK,EACL,gBAAgB,EAChB,2BAA2B,EAE3B,cAAc,EAEd,8BAA8B,EAC9B,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAC/B,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,2BA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,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,YAAY,EACZ,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EACf,SAAS,EACT,aAAa,EACb,SAAS,EACT,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,EACL,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,yBAAyB,EACzB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,KAAK,EACL,gBAAgB,EAChB,2BAA2B,EAE3B,cAAc,EAEd,8BAA8B,EAC9B,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,8BAA8B,EAC9B,+BAA+B,EAC/B,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,2BAA2B,EAE3B,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,aAAa,EACb,eAAe,EACf,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,8BAA8B,EAC9B,IAAI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AAM,sBAAsB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureCheckIn, captureFeedback, startSession, captureSession, endSession, withMonitor, createTransport, getClient, isInitialized, isEnabled, generateInstrumentOnce, getCurrentScope, getGlobalScope, getIsolationScope, getTraceData, getTraceMetaTags, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, makeNodeTransport, NodeClient, defaultStackParser, lastEventId, flush, close, getSentryRelease, createGetModuleFromFilename, anrIntegration, disableAnrDetectionForCallback, consoleIntegration, httpIntegration, nativeNodeFetchIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, requestDataIntegration, fsIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getRootSpan, getSpanDescendants, continueTrace, getAutoPerformanceIntegrations, cron, parameterize, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, dataloaderIntegration, expressIntegration, expressErrorHandler, setupExpressErrorHandler, koaIntegration, setupKoaErrorHandler, connectIntegration, setupConnectErrorHandler, fastifyIntegration, genericPoolIntegration, graphqlIntegration, knexIntegration, kafkaIntegration, lruMemoizerIntegration, mongoIntegration, mongooseIntegration, mysqlIntegration, mysql2Integration, redisIntegration, tediousIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, hapiIntegration, setupHapiErrorHandler, spotlightIntegration, initOpenTelemetry, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, profiler, amqplibIntegration, childProcessIntegration, createSentryWinstonTransport, vercelAIIntegration, logger, consoleLoggingIntegration, wrapMcpServerWithSentry, NODE_VERSION, featureFlagsIntegration, FeatureFlagsIntegration, launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration } from '@sentry/node';
|
|
1
|
+
export { addEventProcessor, addBreadcrumb, addIntegration, captureException, captureEvent, captureMessage, captureCheckIn, captureFeedback, startSession, captureSession, endSession, withMonitor, createTransport, getClient, isInitialized, isEnabled, generateInstrumentOnce, getCurrentScope, getGlobalScope, getIsolationScope, getTraceData, getTraceMetaTags, setCurrentClient, Scope, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, getSpanStatusFromHttpCode, setHttpStatus, withScope, withIsolationScope, makeNodeTransport, NodeClient, defaultStackParser, lastEventId, flush, close, getSentryRelease, createGetModuleFromFilename, anrIntegration, disableAnrDetectionForCallback, consoleIntegration, httpIntegration, nativeNodeFetchIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openAIIntegration, modulesIntegration, contextLinesIntegration, nodeContextIntegration, localVariablesIntegration, requestDataIntegration, fsIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, setMeasurement, getActiveSpan, startSpan, startInactiveSpan, startSpanManual, startNewTrace, suppressTracing, withActiveSpan, getRootSpan, getSpanDescendants, continueTrace, getAutoPerformanceIntegrations, cron, parameterize, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, dataloaderIntegration, expressIntegration, expressErrorHandler, setupExpressErrorHandler, koaIntegration, setupKoaErrorHandler, connectIntegration, setupConnectErrorHandler, fastifyIntegration, genericPoolIntegration, graphqlIntegration, knexIntegration, kafkaIntegration, lruMemoizerIntegration, mongoIntegration, mongooseIntegration, mysqlIntegration, mysql2Integration, redisIntegration, tediousIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, hapiIntegration, setupHapiErrorHandler, spotlightIntegration, initOpenTelemetry, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, profiler, amqplibIntegration, childProcessIntegration, createSentryWinstonTransport, vercelAIIntegration, logger, consoleLoggingIntegration, wrapMcpServerWithSentry, NODE_VERSION, featureFlagsIntegration, FeatureFlagsIntegration, launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration } from '@sentry/node';
|
|
2
2
|
export { captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, } from '@sentry/core';
|
|
3
3
|
export { getDefaultIntegrations, init } from './sdk';
|
|
4
4
|
export { googleCloudHttpIntegration } from './integrations/google-cloud-http';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/google-cloud-serverless",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.41.0",
|
|
4
4
|
"description": "Official Sentry SDK for Google Cloud Functions",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/google-cloud-serverless",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sentry/core": "9.
|
|
52
|
-
"@sentry/node": "9.
|
|
51
|
+
"@sentry/core": "9.41.0",
|
|
52
|
+
"@sentry/node": "9.41.0",
|
|
53
53
|
"@types/express": "^4.17.14"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|