@sentry/google-cloud-serverless 11.22.0 → 11.23.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.
@@ -1,9 +1,9 @@
1
- const require_debug_build = require("../debug-build.js");
2
- const require_utils = require("../utils.js");
3
- let _sentry_node = require("@sentry/node");
4
- let _sentry_core = require("@sentry/core");
5
1
  let _sentry_conventions_attributes = require("@sentry/conventions/attributes");
6
2
  let _sentry_conventions_op = require("@sentry/conventions/op");
3
+ let _sentry_core = require("@sentry/core");
4
+ let _sentry_node = require("@sentry/node");
5
+ const require_debug_build = require("../debug-build.js");
6
+ const require_utils = require("../utils.js");
7
7
  // src/gcpfunction/cloud_events.ts
8
8
  /**
9
9
  * Wraps an event function handler adding it error capture and tracing capabilities.
@@ -1,9 +1,9 @@
1
- const require_debug_build = require("../debug-build.js");
2
- const require_utils = require("../utils.js");
3
- let _sentry_node = require("@sentry/node");
4
- let _sentry_core = require("@sentry/core");
5
1
  let _sentry_conventions_attributes = require("@sentry/conventions/attributes");
6
2
  let _sentry_conventions_op = require("@sentry/conventions/op");
3
+ let _sentry_core = require("@sentry/core");
4
+ let _sentry_node = require("@sentry/node");
5
+ const require_debug_build = require("../debug-build.js");
6
+ const require_utils = require("../utils.js");
7
7
  // src/gcpfunction/events.ts
8
8
  /**
9
9
  * Wraps an event function handler adding it error capture and tracing capabilities.
@@ -1,9 +1,9 @@
1
- const require_debug_build = require("../debug-build.js");
2
- const require_utils = require("../utils.js");
3
- let _sentry_node = require("@sentry/node");
4
- let _sentry_core = require("@sentry/core");
5
1
  let _sentry_conventions_attributes = require("@sentry/conventions/attributes");
6
2
  let _sentry_conventions_op = require("@sentry/conventions/op");
3
+ let _sentry_core = require("@sentry/core");
4
+ let _sentry_node = require("@sentry/node");
5
+ const require_debug_build = require("../debug-build.js");
6
+ const require_utils = require("../utils.js");
7
7
  // src/gcpfunction/http.ts
8
8
  /**
9
9
  * Wraps an HTTP function handler adding it error capture and tracing capabilities.
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ let _sentry_node = require("@sentry/node");
3
+ let _sentry_core = require("@sentry/core");
2
4
  const require_sdk = require("./sdk.js");
3
5
  const require_google_cloud_http = require("./integrations/google-cloud-http.js");
4
6
  const require_google_cloud_grpc = require("./integrations/google-cloud-grpc.js");
5
7
  const require_cloud_events = require("./gcpfunction/cloud_events.js");
6
8
  const require_http = require("./gcpfunction/http.js");
7
9
  const require_events = require("./gcpfunction/events.js");
8
- let _sentry_node = require("@sentry/node");
9
- let _sentry_core = require("@sentry/core");
10
10
  exports.BullMQTelemetry = _sentry_node.BullMQTelemetry;
11
11
  exports.NODE_VERSION = _sentry_node.NODE_VERSION;
12
12
  exports.NodeClient = _sentry_node.NodeClient;
@@ -1,5 +1,5 @@
1
- let _sentry_core = require("@sentry/core");
2
1
  let _sentry_conventions_attributes = require("@sentry/conventions/attributes");
2
+ let _sentry_core = require("@sentry/core");
3
3
  // src/integrations/gcp-context.ts
4
4
  const GCP_CONTEXT_ATTRIBUTE_MAP = {
5
5
  type: _sentry_conventions_attributes.GCP_FUNCTION_CONTEXT_TYPE,
@@ -1,7 +1,7 @@
1
- let _sentry_node = require("@sentry/node");
2
- let _sentry_core = require("@sentry/core");
3
1
  let _sentry_conventions_attributes = require("@sentry/conventions/attributes");
4
2
  let _sentry_conventions_op = require("@sentry/conventions/op");
3
+ let _sentry_core = require("@sentry/core");
4
+ let _sentry_node = require("@sentry/node");
5
5
  // src/integrations/google-cloud-grpc.ts
6
6
  const SERVICE_PATH_REGEX = /^(\w+)\.googleapis.com$/;
7
7
  const INTEGRATION_NAME = "GoogleCloudGrpc";
@@ -1,7 +1,7 @@
1
- let _sentry_node = require("@sentry/node");
2
- let _sentry_core = require("@sentry/core");
3
1
  let _sentry_conventions_attributes = require("@sentry/conventions/attributes");
4
2
  let _sentry_conventions_op = require("@sentry/conventions/op");
3
+ let _sentry_core = require("@sentry/core");
4
+ let _sentry_node = require("@sentry/node");
5
5
  // src/integrations/google-cloud-http.ts
6
6
  const INTEGRATION_NAME = "GoogleCloudHttp";
7
7
  const SETUP_CLIENTS = /* @__PURE__ */ new WeakMap();
package/build/cjs/sdk.js CHANGED
@@ -1,8 +1,8 @@
1
+ let _sentry_core = require("@sentry/core");
2
+ let _sentry_node = require("@sentry/node");
1
3
  const require_gcp_context = require("./integrations/gcp-context.js");
2
4
  const require_google_cloud_grpc = require("./integrations/google-cloud-grpc.js");
3
5
  const require_google_cloud_http = require("./integrations/google-cloud-http.js");
4
- let _sentry_node = require("@sentry/node");
5
- let _sentry_core = require("@sentry/core");
6
6
  // src/sdk.ts
7
7
  function getCjsOnlyIntegrations() {
8
8
  return [require_google_cloud_http.googleCloudHttpIntegration({ optional: true }), require_google_cloud_grpc.googleCloudGrpcIntegration({ optional: true })];
@@ -1,9 +1,9 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
- import { domainify, getFunctionName, markEventUnhandled, proxyFunction } from "../utils.js";
3
- import { captureException, flush, getCurrentScope, startSpanManual } from "@sentry/node";
4
- import { SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK, debug, getClient, handleCallbackErrors, hasSpanStreamingEnabled } from "@sentry/core";
5
1
  import { FAAS_NAME, FAAS_TRIGGER, GCP_FUNCTION_CONTEXT_ID, GCP_FUNCTION_CONTEXT_SOURCE, GCP_FUNCTION_CONTEXT_SPECVERSION, GCP_FUNCTION_CONTEXT_TIME, GCP_FUNCTION_CONTEXT_TYPE, SENTRY_OP, SENTRY_ORIGIN, SENTRY_SEGMENT_NAME_SOURCE } from "@sentry/conventions/attributes";
6
2
  import { FUNCTION_GCP } from "@sentry/conventions/op";
3
+ import { SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK, debug, getClient, handleCallbackErrors, hasSpanStreamingEnabled } from "@sentry/core";
4
+ import { captureException, flush, getCurrentScope as getCurrentScope$1, startSpanManual } from "@sentry/node";
5
+ import { DEBUG_BUILD } from "../debug-build.js";
6
+ import { domainify, getFunctionName, markEventUnhandled, proxyFunction } from "../utils.js";
7
7
  // src/gcpfunction/cloud_events.ts
8
8
  /**
9
9
  * Wraps an event function handler adding it error capture and tracing capabilities.
@@ -39,7 +39,7 @@ function _wrapCloudEventFunction(fn, wrapOptions = {}) {
39
39
  [GCP_FUNCTION_CONTEXT_TIME]: context.time
40
40
  }
41
41
  }, (span) => {
42
- getCurrentScope().setContext("gcp.function.context", { ...context });
42
+ getCurrentScope$1().setContext("gcp.function.context", { ...context });
43
43
  const newCallback = domainify((...args) => {
44
44
  if (args[0] !== null && args[0] !== void 0) captureException(args[0], (scope) => markEventUnhandled(scope, "auto.function.serverless.gcp_cloud_event"));
45
45
  span.end();
@@ -1 +1 @@
1
- {"version":3,"file":"cloud_events.js","names":[],"sources":["../../../src/gcpfunction/cloud_events.ts"],"sourcesContent":["import {\n SENTRY_SEGMENT_NAME_SOURCE,\n FAAS_NAME,\n FAAS_TRIGGER,\n SENTRY_OP,\n GCP_FUNCTION_CONTEXT_TYPE,\n GCP_FUNCTION_CONTEXT_ID,\n GCP_FUNCTION_CONTEXT_SOURCE,\n GCP_FUNCTION_CONTEXT_SPECVERSION,\n GCP_FUNCTION_CONTEXT_TIME,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION_GCP } from '@sentry/conventions/op';\nimport {\n debug,\n getClient,\n handleCallbackErrors,\n hasSpanStreamingEnabled,\n SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, getFunctionName, 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 const client = getClient();\n\n const functionName = getFunctionName();\n const name =\n client && hasSpanStreamingEnabled(client)\n ? functionName || SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK\n : context.type || '<unknown>';\n\n return startSpanManual(\n {\n name,\n attributes: {\n [SENTRY_OP]: FUNCTION_GCP,\n [FAAS_NAME]: functionName,\n [FAAS_TRIGGER]: 'cloud_event',\n [SENTRY_SEGMENT_NAME_SOURCE]: 'component',\n [SENTRY_ORIGIN]: 'auto.function.serverless.gcp_cloud_event',\n [GCP_FUNCTION_CONTEXT_TYPE]: context.type,\n [GCP_FUNCTION_CONTEXT_ID]: context.id,\n [GCP_FUNCTION_CONTEXT_SOURCE]: context.source,\n [GCP_FUNCTION_CONTEXT_SPECVERSION]: context.specversion,\n [GCP_FUNCTION_CONTEXT_TIME]: context.time,\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, 'auto.function.serverless.gcp_cloud_event'));\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, 'auto.function.serverless.gcp_cloud_event'));\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"],"mappings":";;;;;;;;;;;;;;AAkCA,SAAgB,uBACd,IACA,cAAyD,CAAC,GAC1B;CAChC,OAAO,cAAc,KAAI,MAAK,UAAU,wBAAwB,GAAG,WAAW,CAAC,CAAC;AAClF;AAEA,SAAS,wBACP,IACA,cAAyD,CAAC,GAC1B;CAChC,MAAM,UAA4C;EAChD,cAAc;EACd,GAAG;CACL;CACA,QAAQ,SAAS,aAAa;EAC5B,MAAM,SAAS,UAAU;EAEzB,MAAM,eAAe,gBAAgB;EACrC,MAAM,OACJ,UAAU,wBAAwB,MAAM,IACpC,gBAAgB,yCAChB,QAAQ,QAAQ;EAEtB,OAAO,gBACL;GACE;GACA,YAAY;KACT,YAAY;KACZ,YAAY;KACZ,eAAe;KACf,6BAA6B;KAC7B,gBAAgB;KAChB,4BAA4B,QAAQ;KACpC,0BAA0B,QAAQ;KAClC,8BAA8B,QAAQ;KACtC,mCAAmC,QAAQ;KAC3C,4BAA4B,QAAQ;GACvC;EACF,IACA,SAAQ;GACQ,gBACV,CAAC,CAAC,WAAW,wBAAwB,EAAE,GAAG,QAAQ,CAAC;GAEvD,MAAM,cAAc,WAAW,GAAG,SAAoB;IACpD,IAAI,KAAK,OAAO,QAAQ,KAAK,OAAO,KAAA,GAClC,iBAAiB,KAAK,KAAI,UAAS,mBAAmB,OAAO,0CAA0C,CAAC;IAE1G,KAAK,IAAI;IAGT,MAAM,QAAQ,YAAY,CAAC,CACxB,KAAK,OAAM,MAAK;KACf,eAAe,MAAM,MAAM,CAAC;IAC9B,CAAC,CAAC,CACD,WAAW;KACV,IAAI,OAAO,aAAa,YACtB,SAAS,GAAG,IAAI;IAEpB,CAAC;GACL,CAAC;GAED,IAAI,GAAG,SAAS,GACd,OAAO,2BACE,GAAsC,SAAS,WAAW,IACjE,QAAO;IACL,iBAAiB,MAAK,UAAS,mBAAmB,OAAO,0CAA0C,CAAC;GACtG,CACF;GAGF,OAAO,QAAQ,QAAQ,CAAC,CACrB,WAAY,GAA0B,OAAO,CAAC,CAAC,CAC/C,MACC,WAAU,YAAY,MAAM,MAAM,IAClC,QAAO,YAAY,KAAK,KAAA,CAAS,CACnC;EACJ,CACF;CACF;AACF"}
1
+ {"version":3,"file":"cloud_events.js","names":["getCurrentScope"],"sources":["../../../src/gcpfunction/cloud_events.ts"],"sourcesContent":["import {\n SENTRY_SEGMENT_NAME_SOURCE,\n FAAS_NAME,\n FAAS_TRIGGER,\n SENTRY_OP,\n GCP_FUNCTION_CONTEXT_TYPE,\n GCP_FUNCTION_CONTEXT_ID,\n GCP_FUNCTION_CONTEXT_SOURCE,\n GCP_FUNCTION_CONTEXT_SPECVERSION,\n GCP_FUNCTION_CONTEXT_TIME,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION_GCP } from '@sentry/conventions/op';\nimport {\n debug,\n getClient,\n handleCallbackErrors,\n hasSpanStreamingEnabled,\n SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, getFunctionName, 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 const client = getClient();\n\n const functionName = getFunctionName();\n const name =\n client && hasSpanStreamingEnabled(client)\n ? functionName || SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK\n : context.type || '<unknown>';\n\n return startSpanManual(\n {\n name,\n attributes: {\n [SENTRY_OP]: FUNCTION_GCP,\n [FAAS_NAME]: functionName,\n [FAAS_TRIGGER]: 'cloud_event',\n [SENTRY_SEGMENT_NAME_SOURCE]: 'component',\n [SENTRY_ORIGIN]: 'auto.function.serverless.gcp_cloud_event',\n [GCP_FUNCTION_CONTEXT_TYPE]: context.type,\n [GCP_FUNCTION_CONTEXT_ID]: context.id,\n [GCP_FUNCTION_CONTEXT_SOURCE]: context.source,\n [GCP_FUNCTION_CONTEXT_SPECVERSION]: context.specversion,\n [GCP_FUNCTION_CONTEXT_TIME]: context.time,\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, 'auto.function.serverless.gcp_cloud_event'));\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, 'auto.function.serverless.gcp_cloud_event'));\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"],"mappings":";;;;;;;;;;;;;;AAkCA,SAAgB,uBACd,IACA,cAAyD,CAAC,GAC1B;CAChC,OAAO,cAAc,KAAI,MAAK,UAAU,wBAAwB,GAAG,WAAW,CAAC,CAAC;AAClF;AAEA,SAAS,wBACP,IACA,cAAyD,CAAC,GAC1B;CAChC,MAAM,UAA4C;EAChD,cAAc;EACd,GAAG;CACL;CACA,QAAQ,SAAS,aAAa;EAC5B,MAAM,SAAS,UAAU;EAEzB,MAAM,eAAe,gBAAgB;EACrC,MAAM,OACJ,UAAU,wBAAwB,MAAM,IACpC,gBAAgB,yCAChB,QAAQ,QAAQ;EAEtB,OAAO,gBACL;GACE;GACA,YAAY;KACT,YAAY;KACZ,YAAY;KACZ,eAAe;KACf,6BAA6B;KAC7B,gBAAgB;KAChB,4BAA4B,QAAQ;KACpC,0BAA0B,QAAQ;KAClC,8BAA8B,QAAQ;KACtC,mCAAmC,QAAQ;KAC3C,4BAA4B,QAAQ;GACvC;EACF,IACA,SAAQ;GACQA,kBACV,CAAC,CAAC,WAAW,wBAAwB,EAAE,GAAG,QAAQ,CAAC;GAEvD,MAAM,cAAc,WAAW,GAAG,SAAoB;IACpD,IAAI,KAAK,OAAO,QAAQ,KAAK,OAAO,KAAA,GAClC,iBAAiB,KAAK,KAAI,UAAS,mBAAmB,OAAO,0CAA0C,CAAC;IAE1G,KAAK,IAAI;IAGT,MAAM,QAAQ,YAAY,CAAC,CACxB,KAAK,OAAM,MAAK;KACf,eAAe,MAAM,MAAM,CAAC;IAC9B,CAAC,CAAC,CACD,WAAW;KACV,IAAI,OAAO,aAAa,YACtB,SAAS,GAAG,IAAI;IAEpB,CAAC;GACL,CAAC;GAED,IAAI,GAAG,SAAS,GACd,OAAO,2BACE,GAAsC,SAAS,WAAW,IACjE,QAAO;IACL,iBAAiB,MAAK,UAAS,mBAAmB,OAAO,0CAA0C,CAAC;GACtG,CACF;GAGF,OAAO,QAAQ,QAAQ,CAAC,CACrB,WAAY,GAA0B,OAAO,CAAC,CAAC,CAC/C,MACC,WAAU,YAAY,MAAM,MAAM,IAClC,QAAO,YAAY,KAAK,KAAA,CAAS,CACnC;EACJ,CACF;CACF;AACF"}
@@ -1,9 +1,9 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
- import { domainify, getFunctionName, markEventUnhandled, proxyFunction } from "../utils.js";
3
- import { captureException, flush, getCurrentScope, startSpanManual } from "@sentry/node";
4
- import { SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK, debug, getClient, handleCallbackErrors, hasSpanStreamingEnabled } from "@sentry/core";
5
1
  import { FAAS_NAME, FAAS_TRIGGER, GCP_FUNCTION_CONTEXT_EVENT_ID, GCP_FUNCTION_CONTEXT_EVENT_TYPE, GCP_FUNCTION_CONTEXT_RESOURCE, GCP_FUNCTION_CONTEXT_TIMESTAMP, SENTRY_OP, SENTRY_ORIGIN, SENTRY_SEGMENT_NAME_SOURCE } from "@sentry/conventions/attributes";
6
2
  import { FUNCTION_GCP } from "@sentry/conventions/op";
3
+ import { SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK, debug, getClient, handleCallbackErrors, hasSpanStreamingEnabled } from "@sentry/core";
4
+ import { captureException, flush, getCurrentScope as getCurrentScope$1, startSpanManual } from "@sentry/node";
5
+ import { DEBUG_BUILD } from "../debug-build.js";
6
+ import { domainify, getFunctionName, markEventUnhandled, proxyFunction } from "../utils.js";
7
7
  // src/gcpfunction/events.ts
8
8
  /**
9
9
  * Wraps an event function handler adding it error capture and tracing capabilities.
@@ -40,7 +40,7 @@ function _wrapEventFunction(fn, wrapOptions = {}) {
40
40
  [GCP_FUNCTION_CONTEXT_TIMESTAMP]: context.timestamp
41
41
  }
42
42
  }, (span) => {
43
- getCurrentScope().setContext("gcp.function.context", { ...context });
43
+ getCurrentScope$1().setContext("gcp.function.context", { ...context });
44
44
  const newCallback = domainify((...args) => {
45
45
  if (args[0] !== null && args[0] !== void 0) captureException(args[0], (scope) => markEventUnhandled(scope, "auto.function.serverless.gcp_event"));
46
46
  span.end();
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","names":[],"sources":["../../../src/gcpfunction/events.ts"],"sourcesContent":["import {\n SENTRY_SEGMENT_NAME_SOURCE,\n FAAS_NAME,\n FAAS_TRIGGER,\n SENTRY_OP,\n GCP_FUNCTION_CONTEXT_EVENT_TYPE,\n GCP_FUNCTION_CONTEXT_EVENT_ID,\n GCP_FUNCTION_CONTEXT_RESOURCE,\n GCP_FUNCTION_CONTEXT_TIMESTAMP,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION_GCP } from '@sentry/conventions/op';\nimport {\n debug,\n getClient,\n handleCallbackErrors,\n hasSpanStreamingEnabled,\n SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, getFunctionName, 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 const client = getClient();\n\n const functionName = getFunctionName();\n const name =\n client && hasSpanStreamingEnabled(client)\n ? functionName || SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK\n : context.eventType;\n\n return startSpanManual(\n {\n name,\n attributes: {\n [SENTRY_OP]: FUNCTION_GCP,\n [FAAS_NAME]: functionName,\n [FAAS_TRIGGER]: 'event',\n [SENTRY_SEGMENT_NAME_SOURCE]: 'component',\n [SENTRY_ORIGIN]: 'auto.function.serverless.gcp_event',\n [GCP_FUNCTION_CONTEXT_EVENT_TYPE]: context.eventType,\n [GCP_FUNCTION_CONTEXT_EVENT_ID]: context.eventId,\n [GCP_FUNCTION_CONTEXT_RESOURCE]: context.resource,\n [GCP_FUNCTION_CONTEXT_TIMESTAMP]: context.timestamp,\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, 'auto.function.serverless.gcp_event'));\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, 'auto.function.serverless.gcp_event'));\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"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAgB,kBACd,IACA,cAAoD,CAAC,GAC1B;CAC3B,OAAO,cAAc,KAAI,MAAK,UAAU,mBAAmB,GAAG,WAAW,CAAC,CAAC;AAC7E;;AAGA,SAAS,mBACP,IACA,cAAoD,CAAC,GACM;CAC3D,MAAM,UAAuC;EAC3C,cAAc;EACd,GAAG;CACL;CACA,QAAQ,GAAG,2BAAyE;EAClF,MAAM,CAAC,MAAM,SAAS,YAAY;EAElC,MAAM,SAAS,UAAU;EAEzB,MAAM,eAAe,gBAAgB;EACrC,MAAM,OACJ,UAAU,wBAAwB,MAAM,IACpC,gBAAgB,yCAChB,QAAQ;EAEd,OAAO,gBACL;GACE;GACA,YAAY;KACT,YAAY;KACZ,YAAY;KACZ,eAAe;KACf,6BAA6B;KAC7B,gBAAgB;KAChB,kCAAkC,QAAQ;KAC1C,gCAAgC,QAAQ;KACxC,gCAAgC,QAAQ;KACxC,iCAAiC,QAAQ;GAC5C;EACF,IACA,SAAQ;GACQ,gBACV,CAAC,CAAC,WAAW,wBAAwB,EAAE,GAAG,QAAQ,CAAC;GAEvD,MAAM,cAAc,WAAW,GAAG,SAAoB;IACpD,IAAI,KAAK,OAAO,QAAQ,KAAK,OAAO,KAAA,GAClC,iBAAiB,KAAK,KAAI,UAAS,mBAAmB,OAAO,oCAAoC,CAAC;IAEpG,KAAK,IAAI;IAGT,MAAM,QAAQ,YAAY,CAAC,CACxB,KAAK,OAAM,MAAK;KACf,eAAe,MAAM,MAAM,CAAC;IAC9B,CAAC,CAAC,CACD,WAAW;KACV,IAAI,OAAO,aAAa,YACtB,SAAS,GAAG,IAAI;IAEpB,CAAC;GACL,CAAC;GAED,IAAI,GAAG,SAAS,GACd,OAAO,2BACE,GAAiC,MAAM,SAAS,WAAW,IAClE,QAAO;IACL,iBAAiB,MAAK,UAAS,mBAAmB,OAAO,oCAAoC,CAAC;GAChG,CACF;GAGF,OAAO,QAAQ,QAAQ,CAAC,CACrB,WAAY,GAAqB,MAAM,OAAO,CAAC,CAAC,CAChD,MACC,WAAU,YAAY,MAAM,MAAM,IAClC,QAAO,YAAY,KAAK,KAAA,CAAS,CACnC;EACJ,CACF;CACF;AACF"}
1
+ {"version":3,"file":"events.js","names":["getCurrentScope"],"sources":["../../../src/gcpfunction/events.ts"],"sourcesContent":["import {\n SENTRY_SEGMENT_NAME_SOURCE,\n FAAS_NAME,\n FAAS_TRIGGER,\n SENTRY_OP,\n GCP_FUNCTION_CONTEXT_EVENT_TYPE,\n GCP_FUNCTION_CONTEXT_EVENT_ID,\n GCP_FUNCTION_CONTEXT_RESOURCE,\n GCP_FUNCTION_CONTEXT_TIMESTAMP,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION_GCP } from '@sentry/conventions/op';\nimport {\n debug,\n getClient,\n handleCallbackErrors,\n hasSpanStreamingEnabled,\n SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK,\n} from '@sentry/core';\nimport { captureException, flush, getCurrentScope, startSpanManual } from '@sentry/node';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { domainify, getFunctionName, 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 const client = getClient();\n\n const functionName = getFunctionName();\n const name =\n client && hasSpanStreamingEnabled(client)\n ? functionName || SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK\n : context.eventType;\n\n return startSpanManual(\n {\n name,\n attributes: {\n [SENTRY_OP]: FUNCTION_GCP,\n [FAAS_NAME]: functionName,\n [FAAS_TRIGGER]: 'event',\n [SENTRY_SEGMENT_NAME_SOURCE]: 'component',\n [SENTRY_ORIGIN]: 'auto.function.serverless.gcp_event',\n [GCP_FUNCTION_CONTEXT_EVENT_TYPE]: context.eventType,\n [GCP_FUNCTION_CONTEXT_EVENT_ID]: context.eventId,\n [GCP_FUNCTION_CONTEXT_RESOURCE]: context.resource,\n [GCP_FUNCTION_CONTEXT_TIMESTAMP]: context.timestamp,\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, 'auto.function.serverless.gcp_event'));\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, 'auto.function.serverless.gcp_event'));\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"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAgB,kBACd,IACA,cAAoD,CAAC,GAC1B;CAC3B,OAAO,cAAc,KAAI,MAAK,UAAU,mBAAmB,GAAG,WAAW,CAAC,CAAC;AAC7E;;AAGA,SAAS,mBACP,IACA,cAAoD,CAAC,GACM;CAC3D,MAAM,UAAuC;EAC3C,cAAc;EACd,GAAG;CACL;CACA,QAAQ,GAAG,2BAAyE;EAClF,MAAM,CAAC,MAAM,SAAS,YAAY;EAElC,MAAM,SAAS,UAAU;EAEzB,MAAM,eAAe,gBAAgB;EACrC,MAAM,OACJ,UAAU,wBAAwB,MAAM,IACpC,gBAAgB,yCAChB,QAAQ;EAEd,OAAO,gBACL;GACE;GACA,YAAY;KACT,YAAY;KACZ,YAAY;KACZ,eAAe;KACf,6BAA6B;KAC7B,gBAAgB;KAChB,kCAAkC,QAAQ;KAC1C,gCAAgC,QAAQ;KACxC,gCAAgC,QAAQ;KACxC,iCAAiC,QAAQ;GAC5C;EACF,IACA,SAAQ;GACQA,kBACV,CAAC,CAAC,WAAW,wBAAwB,EAAE,GAAG,QAAQ,CAAC;GAEvD,MAAM,cAAc,WAAW,GAAG,SAAoB;IACpD,IAAI,KAAK,OAAO,QAAQ,KAAK,OAAO,KAAA,GAClC,iBAAiB,KAAK,KAAI,UAAS,mBAAmB,OAAO,oCAAoC,CAAC;IAEpG,KAAK,IAAI;IAGT,MAAM,QAAQ,YAAY,CAAC,CACxB,KAAK,OAAM,MAAK;KACf,eAAe,MAAM,MAAM,CAAC;IAC9B,CAAC,CAAC,CACD,WAAW;KACV,IAAI,OAAO,aAAa,YACtB,SAAS,GAAG,IAAI;IAEpB,CAAC;GACL,CAAC;GAED,IAAI,GAAG,SAAS,GACd,OAAO,2BACE,GAAiC,MAAM,SAAS,WAAW,IAClE,QAAO;IACL,iBAAiB,MAAK,UAAS,mBAAmB,OAAO,oCAAoC,CAAC;GAChG,CACF;GAGF,OAAO,QAAQ,QAAQ,CAAC,CACrB,WAAY,GAAqB,MAAM,OAAO,CAAC,CAAC,CAChD,MACC,WAAU,YAAY,MAAM,MAAM,IAClC,QAAO,YAAY,KAAK,KAAA,CAAS,CACnC;EACJ,CACF;CACF;AACF"}
@@ -1,9 +1,9 @@
1
- import { DEBUG_BUILD } from "../debug-build.js";
2
- import { domainify, getFunctionName, markEventUnhandled, proxyFunction } from "../utils.js";
3
- import { captureException, continueTrace, flush, getCurrentScope, startSpanManual } from "@sentry/node";
4
- import { SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK, debug, getClient, handleCallbackErrors, hasSpanStreamingEnabled, httpRequestToRequestData, isString, setHttpStatus, stripUrlQueryAndFragment } from "@sentry/core";
5
1
  import { FAAS_NAME, FAAS_TRIGGER, HTTP_REQUEST_METHOD, SENTRY_OP, SENTRY_ORIGIN, SENTRY_SEGMENT_NAME_SOURCE, URL_PATH } from "@sentry/conventions/attributes";
6
2
  import { FUNCTION_GCP } from "@sentry/conventions/op";
3
+ import { SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK, debug, getClient, handleCallbackErrors, hasSpanStreamingEnabled, httpRequestToRequestData, isString, setHttpStatus, stripUrlQueryAndFragment } from "@sentry/core";
4
+ import { captureException, continueTrace, flush, getCurrentScope as getCurrentScope$1, startSpanManual } from "@sentry/node";
5
+ import { DEBUG_BUILD } from "../debug-build.js";
6
+ import { domainify, getFunctionName, markEventUnhandled, proxyFunction } from "../utils.js";
7
7
  // src/gcpfunction/http.ts
8
8
  /**
9
9
  * Wraps an HTTP function handler adding it error capture and tracing capabilities.
@@ -32,7 +32,7 @@ function _wrapHttpFunction(fn, options) {
32
32
  baggage
33
33
  }, () => {
34
34
  const normalizedRequest = httpRequestToRequestData(req);
35
- getCurrentScope().setSDKProcessingMetadata({ normalizedRequest });
35
+ getCurrentScope$1().setSDKProcessingMetadata({ normalizedRequest });
36
36
  const functionName = getFunctionName();
37
37
  const client = getClient();
38
38
  const hasSpanStreaming = client && hasSpanStreamingEnabled(client);
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","names":[],"sources":["../../../src/gcpfunction/http.ts"],"sourcesContent":["import {\n SENTRY_SEGMENT_NAME_SOURCE,\n FAAS_NAME,\n FAAS_TRIGGER,\n HTTP_REQUEST_METHOD,\n SENTRY_OP,\n URL_PATH,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION_GCP } from '@sentry/conventions/op';\nimport {\n debug,\n getClient,\n handleCallbackErrors,\n hasSpanStreamingEnabled,\n httpRequestToRequestData,\n isString,\n SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK,\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, getFunctionName, 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 const functionName = getFunctionName();\n\n const client = getClient();\n const hasSpanStreaming = client && hasSpanStreamingEnabled(client);\n const name = hasSpanStreaming ? functionName || SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK : `${reqMethod} ${reqUrl}`;\n\n return startSpanManual(\n {\n name,\n attributes: {\n [SENTRY_OP]: FUNCTION_GCP,\n [FAAS_NAME]: functionName,\n [FAAS_TRIGGER]: 'http',\n [SENTRY_SEGMENT_NAME_SOURCE]: hasSpanStreaming ? 'component' : 'route',\n [SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',\n // The method and path used to be the span name; they stay on the span so that\n // information survives the low-cardinality rename.\n [HTTP_REQUEST_METHOD]: reqMethod || undefined,\n [URL_PATH]: reqUrl || undefined,\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, 'auto.function.serverless.gcp_http'));\n },\n );\n },\n );\n });\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAgB,iBAAiB,IAAkB,cAAuC,CAAC,GAAiB;CAC1G,MAAM,QAAQ,MAAkC,UAAU,kBAAkB,GAAG,WAAW,CAAC;CAE3F,IAAI;CAIJ,MAAM,eAAgB,GAAyD;CAC/E,IAAI,cACF,YAAY,EAAE,iBAAiB,cAAc,cAAc,IAAI,EAAE;CAEnE,OAAO,cAAc,IAAI,MAAM,SAAS;AAC1C;;AAGA,SAAS,kBAAkB,IAAkB,SAAgD;CAC3F,MAAM,eAAe,QAAQ,gBAAgB;CAC7C,QAAQ,KAAK,QAAQ;EACnB,MAAM,aAAa,IAAI,UAAU,GAAA,CAAI,YAAY;EACjD,MAAM,SAAS,yBAAyB,IAAI,eAAe,IAAI,OAAO,EAAE;EAExE,MAAM,cAAc,IAAI,WAAW,SAAS,IAAI,QAAQ,eAAe,IAAI,IAAI,QAAQ,kBAAkB,KAAA;EACzG,MAAM,UAAU,IAAI,SAAS;EAE7B,OAAO,cAAc;GAAE;GAAa;EAAQ,SAAS;GACnD,MAAM,oBAAoB,yBAAyB,GAAG;GACtD,gBAAgB,CAAC,CAAC,yBAAyB,EAAE,kBAAkB,CAAC;GAEhE,MAAM,eAAe,gBAAgB;GAErC,MAAM,SAAS,UAAU;GACzB,MAAM,mBAAmB,UAAU,wBAAwB,MAAM;GACjE,MAAM,OAAO,mBAAmB,gBAAgB,yCAAyC,GAAG,UAAU,GAAG;GAEzG,OAAO,gBACL;IACE;IACA,YAAY;MACT,YAAY;MACZ,YAAY;MACZ,eAAe;MACf,6BAA6B,mBAAmB,cAAc;MAC9D,gBAAgB;MAGhB,sBAAsB,aAAa,KAAA;MACnC,WAAW,UAAU,KAAA;IACxB;GACF,IACA,SAAQ;IAEN,MAAM,OAAO,IAAI;IAEjB,IAAI,MAAM,SAAU,OAA4B,UAAkC,IAAsB;KACtG,cAAc,MAAM,IAAI,UAAU;KAClC,KAAK,IAAI;KAGT,MAAM,YAAY,CAAC,CAChB,KAAK,OAAM,MAAK;MACf,eAAe,MAAM,MAAM,CAAC;KAC9B,CAAC,CAAC,CACD,WAAW;MACV,KAAK,KAAK,MAAM,OAAO,UAAU,EAAE;KACrC,CAAC;IACL;IAEA,OAAO,2BACC,GAAG,KAAK,GAAG,IACjB,QAAO;KACL,iBAAiB,MAAK,UAAS,mBAAmB,OAAO,mCAAmC,CAAC;IAC/F,CACF;GACF,CACF;EACF,CAAC;CACH;AACF"}
1
+ {"version":3,"file":"http.js","names":["getCurrentScope"],"sources":["../../../src/gcpfunction/http.ts"],"sourcesContent":["import {\n SENTRY_SEGMENT_NAME_SOURCE,\n FAAS_NAME,\n FAAS_TRIGGER,\n HTTP_REQUEST_METHOD,\n SENTRY_OP,\n URL_PATH,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { FUNCTION_GCP } from '@sentry/conventions/op';\nimport {\n debug,\n getClient,\n handleCallbackErrors,\n hasSpanStreamingEnabled,\n httpRequestToRequestData,\n isString,\n SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK,\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, getFunctionName, 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 const functionName = getFunctionName();\n\n const client = getClient();\n const hasSpanStreaming = client && hasSpanStreamingEnabled(client);\n const name = hasSpanStreaming ? functionName || SERVERLESS_FUNCTION_SPAN_NAME_FALLBACK : `${reqMethod} ${reqUrl}`;\n\n return startSpanManual(\n {\n name,\n attributes: {\n [SENTRY_OP]: FUNCTION_GCP,\n [FAAS_NAME]: functionName,\n [FAAS_TRIGGER]: 'http',\n [SENTRY_SEGMENT_NAME_SOURCE]: hasSpanStreaming ? 'component' : 'route',\n [SENTRY_ORIGIN]: 'auto.function.serverless.gcp_http',\n // The method and path used to be the span name; they stay on the span so that\n // information survives the low-cardinality rename.\n [HTTP_REQUEST_METHOD]: reqMethod || undefined,\n [URL_PATH]: reqUrl || undefined,\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, 'auto.function.serverless.gcp_http'));\n },\n );\n },\n );\n });\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAgB,iBAAiB,IAAkB,cAAuC,CAAC,GAAiB;CAC1G,MAAM,QAAQ,MAAkC,UAAU,kBAAkB,GAAG,WAAW,CAAC;CAE3F,IAAI;CAIJ,MAAM,eAAgB,GAAyD;CAC/E,IAAI,cACF,YAAY,EAAE,iBAAiB,cAAc,cAAc,IAAI,EAAE;CAEnE,OAAO,cAAc,IAAI,MAAM,SAAS;AAC1C;;AAGA,SAAS,kBAAkB,IAAkB,SAAgD;CAC3F,MAAM,eAAe,QAAQ,gBAAgB;CAC7C,QAAQ,KAAK,QAAQ;EACnB,MAAM,aAAa,IAAI,UAAU,GAAA,CAAI,YAAY;EACjD,MAAM,SAAS,yBAAyB,IAAI,eAAe,IAAI,OAAO,EAAE;EAExE,MAAM,cAAc,IAAI,WAAW,SAAS,IAAI,QAAQ,eAAe,IAAI,IAAI,QAAQ,kBAAkB,KAAA;EACzG,MAAM,UAAU,IAAI,SAAS;EAE7B,OAAO,cAAc;GAAE;GAAa;EAAQ,SAAS;GACnD,MAAM,oBAAoB,yBAAyB,GAAG;GACtDA,kBAAgB,CAAC,CAAC,yBAAyB,EAAE,kBAAkB,CAAC;GAEhE,MAAM,eAAe,gBAAgB;GAErC,MAAM,SAAS,UAAU;GACzB,MAAM,mBAAmB,UAAU,wBAAwB,MAAM;GACjE,MAAM,OAAO,mBAAmB,gBAAgB,yCAAyC,GAAG,UAAU,GAAG;GAEzG,OAAO,gBACL;IACE;IACA,YAAY;MACT,YAAY;MACZ,YAAY;MACZ,eAAe;MACf,6BAA6B,mBAAmB,cAAc;MAC9D,gBAAgB;MAGhB,sBAAsB,aAAa,KAAA;MACnC,WAAW,UAAU,KAAA;IACxB;GACF,IACA,SAAQ;IAEN,MAAM,OAAO,IAAI;IAEjB,IAAI,MAAM,SAAU,OAA4B,UAAkC,IAAsB;KACtG,cAAc,MAAM,IAAI,UAAU;KAClC,KAAK,IAAI;KAGT,MAAM,YAAY,CAAC,CAChB,KAAK,OAAM,MAAK;MACf,eAAe,MAAM,MAAM,CAAC;KAC9B,CAAC,CAAC,CACD,WAAW;MACV,KAAK,KAAK,MAAM,OAAO,UAAU,EAAE;KACrC,CAAC;IACL;IAEA,OAAO,2BACC,GAAG,KAAK,GAAG,IACjB,QAAO;KACL,iBAAiB,MAAK,UAAS,mBAAmB,OAAO,mCAAmC,CAAC;IAC/F,CACF;GACF,CACF;EACF,CAAC;CACH;AACF"}
@@ -1,9 +1,9 @@
1
+ import { BullMQTelemetry, NODE_VERSION, NodeClient, OpenFeatureIntegrationHook, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, SentryMastraExporter, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, anthropicAIIntegration, awsIntegration, awsLambdaWebIntegration, bindScopeToEmitter, buildLaunchDarklyFlagUsedHandler, captureCheckIn, captureEvent, captureException, captureFeedback, captureMessage, captureSession, childProcessIntegration, clickhouseIntegration, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createFlueInstrumentation, createGetModuleFromFilename, createLangChainCallbackHandler, createSentryWinstonTransport, createTransport, cron, cronJobIntegration, dataloaderIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eveConversationHook, eveInstrumentation, eveIntegration, eventFiltersIntegration, expressErrorHandler, expressIntegration, fastifyIntegration, featureFlagsIntegration, firebaseIntegration, flush, fsIntegration, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getGlobalScope, getHttpAgent, getInstrumentedModuleNames, getIsolationScope, getOtlpTracesEndpoint, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTraceData, getTraceMetaTags, getTunnelPath, googleGenAIIntegration, graphqlIntegration, groqIntegration, growthbookIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpHeadersToSpanAttributes, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentAnthropicAiClient, instrumentCreateReactAgent, instrumentGoogleGenAIClient, instrumentLangChainEmbeddings, instrumentMistralAiClient, instrumentOpenAiClient, instrumentPostgresJsSql, instrumentStateGraph, instrumentStateGraphCompile, instrumentSupabaseClient, instrumentTypeSafeClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, langChainIntegration, langGraphIntegration, lastEventId, launchDarklyIntegration, linkedErrorsIntegration, localVariablesIntegration, logger, lruMemoizerIntegration, makeNodeTransport, mastraIntegration, mcpServerIntegration, metrics, mistralAIIntegration, moduleMetadataIntegration, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, nodeCronIntegration, nodeRuntimeMetricsIntegration, nodeScheduleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openAIIntegration, openFeatureIntegration, openTelemetryIntegration, parameterize, piAiIntegration, piDurableIntegration, pinoIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, processSessionIntegration, profiler, redisIntegration, requestDataIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setConversationId, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, statsigIntegration, supabaseIntegration, suppressTracing, systemErrorIntegration, tanstackAIIntegration, tediousIntegration, togetherAIIntegration, trpcMiddleware, typesafeIntegration, unleashIntegration, updateSpanName, vercelAIIntegration, winterCGHeadersToDict, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, workerThreadsIntegration, wrapMcpServerWithSentry, zodErrorsIntegration } from "@sentry/node";
2
+ import { captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration } from "@sentry/core";
1
3
  import { getDefaultIntegrations, init } from "./sdk.js";
2
4
  import { googleCloudHttpIntegration } from "./integrations/google-cloud-http.js";
3
5
  import { googleCloudGrpcIntegration } from "./integrations/google-cloud-grpc.js";
4
6
  import { wrapCloudEventFunction } from "./gcpfunction/cloud_events.js";
5
7
  import { wrapHttpFunction } from "./gcpfunction/http.js";
6
8
  import { wrapEventFunction } from "./gcpfunction/events.js";
7
- import { BullMQTelemetry, NODE_VERSION, NodeClient, OpenFeatureIntegrationHook, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, SentryMastraExporter, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, anthropicAIIntegration, awsIntegration, awsLambdaWebIntegration, bindScopeToEmitter, buildLaunchDarklyFlagUsedHandler, captureCheckIn, captureEvent, captureException, captureFeedback, captureMessage, captureSession, childProcessIntegration, clickhouseIntegration, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createFlueInstrumentation, createGetModuleFromFilename, createLangChainCallbackHandler, createSentryWinstonTransport, createTransport, cron, cronJobIntegration, dataloaderIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eveConversationHook, eveInstrumentation, eveIntegration, eventFiltersIntegration, expressErrorHandler, expressIntegration, fastifyIntegration, featureFlagsIntegration, firebaseIntegration, flush, fsIntegration, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getGlobalScope, getHttpAgent, getInstrumentedModuleNames, getIsolationScope, getOtlpTracesEndpoint, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTraceData, getTraceMetaTags, getTunnelPath, googleGenAIIntegration, graphqlIntegration, groqIntegration, growthbookIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpHeadersToSpanAttributes, httpIntegration, httpServerIntegration, httpServerSpansIntegration, initOpenTelemetry, instrumentAnthropicAiClient, instrumentCreateReactAgent, instrumentGoogleGenAIClient, instrumentLangChainEmbeddings, instrumentMistralAiClient, instrumentOpenAiClient, instrumentPostgresJsSql, instrumentStateGraph, instrumentStateGraphCompile, instrumentSupabaseClient, instrumentTypeSafeClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, langChainIntegration, langGraphIntegration, lastEventId, launchDarklyIntegration, linkedErrorsIntegration, localVariablesIntegration, logger, lruMemoizerIntegration, makeNodeTransport, mastraIntegration, mcpServerIntegration, metrics, mistralAIIntegration, moduleMetadataIntegration, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, nodeCronIntegration, nodeRuntimeMetricsIntegration, nodeScheduleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openAIIntegration, openFeatureIntegration, openTelemetryIntegration, parameterize, piAiIntegration, piDurableIntegration, pinoIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, processSessionIntegration, profiler, redisIntegration, requestDataIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setConversationId, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, statsigIntegration, supabaseIntegration, suppressTracing, systemErrorIntegration, tanstackAIIntegration, tediousIntegration, togetherAIIntegration, trpcMiddleware, typesafeIntegration, unleashIntegration, updateSpanName, vercelAIIntegration, winterCGHeadersToDict, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, workerThreadsIntegration, wrapMcpServerWithSentry, zodErrorsIntegration } from "@sentry/node";
8
- import { captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration } from "@sentry/core";
9
9
  export { BullMQTelemetry, NODE_VERSION, NodeClient, OpenFeatureIntegrationHook, SDK_VERSION, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, Scope, SentryMastraExporter, addBreadcrumb, addEventProcessor, addIntegration, amqplibIntegration, anrIntegration, anthropicAIIntegration, awsIntegration, awsLambdaWebIntegration, bindScopeToEmitter, buildLaunchDarklyFlagUsedHandler, captureCheckIn, captureConsoleIntegration, captureEvent, captureException, captureFeedback, captureMessage, captureSession, childProcessIntegration, clickhouseIntegration, close, consoleIntegration, consoleLoggingIntegration, contextLinesIntegration, continueTrace, createConsolaReporter, createFlueInstrumentation, createGetModuleFromFilename, createLangChainCallbackHandler, createSentryWinstonTransport, createTransport, cron, cronJobIntegration, dataloaderIntegration, dedupeIntegration, defaultStackParser, disableAnrDetectionForCallback, endSession, eveConversationHook, eveInstrumentation, eveIntegration, eventFiltersIntegration, expressErrorHandler, expressIntegration, extraErrorDataIntegration, fastifyIntegration, featureFlagsIntegration, firebaseIntegration, flush, fsIntegration, functionToStringIntegration, genericPoolIntegration, getActiveSpan, getAutoPerformanceIntegrations, getClient, getCurrentScope, getDefaultIntegrations, getGlobalScope, getHttpAgent, getInstrumentedModuleNames, getIsolationScope, getOtlpTracesEndpoint, getRootSpan, getSentryRelease, getSpanDescendants, getSpanStatusFromHttpCode, getTraceData, getTraceMetaTags, getTunnelPath, googleCloudGrpcIntegration, googleCloudHttpIntegration, googleGenAIIntegration, graphqlIntegration, groqIntegration, growthbookIntegration, handleTunnelRequest, handleTunnelRequestIfMatched, hapiIntegration, honoIntegration, honoMiddleware, httpHeadersToSpanAttributes, httpIntegration, httpServerIntegration, httpServerSpansIntegration, init, initOpenTelemetry, instrumentAnthropicAiClient, instrumentCreateReactAgent, instrumentGoogleGenAIClient, instrumentLangChainEmbeddings, instrumentMistralAiClient, instrumentOpenAiClient, instrumentPostgresJsSql, instrumentStateGraph, instrumentStateGraphCompile, instrumentSupabaseClient, instrumentTypeSafeClient, isEnabled, isInitialized, isTunnelRequest, kafkaIntegration, knexIntegration, koaIntegration, langChainIntegration, langGraphIntegration, lastEventId, launchDarklyIntegration, linkedErrorsIntegration, localVariablesIntegration, logger, lruMemoizerIntegration, makeNodeTransport, mastraIntegration, mcpServerIntegration, metrics, mistralAIIntegration, moduleMetadataIntegration, modulesIntegration, mongoIntegration, mongooseIntegration, mysql2Integration, mysqlIntegration, nativeNodeFetchIntegration, neonIntegration, nitroIntegration, nodeContextIntegration, nodeCronIntegration, nodeRuntimeMetricsIntegration, nodeScheduleIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, openAIIntegration, openFeatureIntegration, openTelemetryIntegration, parameterize, piAiIntegration, piDurableIntegration, pinoIntegration, postgresIntegration, postgresJsIntegration, prismaIntegration, processSessionIntegration, profiler, redisIntegration, requestDataIntegration, rewriteFramesIntegration, serveTunnelIntegration, setAttribute, setAttributes, setContext, setConversationId, setCurrentClient, setExtra, setExtras, setHttpStatus, setMeasurement, setTag, setTags, setUser, setupExpressErrorHandler, setupHapiErrorHandler, setupKoaErrorHandler, spanStreamingIntegration, spanToBaggageHeader, spanToJSON, spanToStaticSpanJSON, spanToTraceHeader, spotlightIntegration, startInactiveSpan, startNewTrace, startSession, startSpan, startSpanManual, statsigIntegration, supabaseIntegration, suppressTracing, systemErrorIntegration, tanstackAIIntegration, tediousIntegration, togetherAIIntegration, trpcMiddleware, typesafeIntegration, unleashIntegration, updateSpanName, vercelAIIntegration, winterCGHeadersToDict, withActiveSpan, withIsolationScope, withMonitor, withScope, withStaticSpan, withStreamedSpan, workerThreadsIntegration, wrapCloudEventFunction, wrapEventFunction, wrapHttpFunction, wrapMcpServerWithSentry, zodErrorsIntegration };
@@ -1,5 +1,5 @@
1
- import { defineIntegration, getCurrentScope, safeSetSpanJSONAttributes } from "@sentry/core";
2
1
  import { GCP_FUNCTION_CONTEXT_EVENT_ID, GCP_FUNCTION_CONTEXT_EVENT_TYPE, GCP_FUNCTION_CONTEXT_ID, GCP_FUNCTION_CONTEXT_RESOURCE, GCP_FUNCTION_CONTEXT_SOURCE, GCP_FUNCTION_CONTEXT_SPECVERSION, GCP_FUNCTION_CONTEXT_TIME, GCP_FUNCTION_CONTEXT_TIMESTAMP, GCP_FUNCTION_CONTEXT_TYPE } from "@sentry/conventions/attributes";
2
+ import { defineIntegration, getCurrentScope, safeSetSpanJSONAttributes } from "@sentry/core";
3
3
  // src/integrations/gcp-context.ts
4
4
  const GCP_CONTEXT_ATTRIBUTE_MAP = {
5
5
  type: GCP_FUNCTION_CONTEXT_TYPE,
@@ -1,8 +1,8 @@
1
1
  import { __require } from "../_virtual/_rolldown/runtime.js";
2
- import { startInactiveSpan } from "@sentry/node";
3
- import { defineIntegration, fill, getClient } from "@sentry/core";
4
2
  import { RPC_METHOD, RPC_SERVICE, RPC_SYSTEM_NAME, SENTRY_OP, SENTRY_ORIGIN } from "@sentry/conventions/attributes";
5
3
  import { GRPC } from "@sentry/conventions/op";
4
+ import { defineIntegration, fill, getClient } from "@sentry/core";
5
+ import { startInactiveSpan } from "@sentry/node";
6
6
  // src/integrations/google-cloud-grpc.ts
7
7
  const SERVICE_PATH_REGEX = /^(\w+)\.googleapis.com$/;
8
8
  const INTEGRATION_NAME = "GoogleCloudGrpc";
@@ -1,8 +1,8 @@
1
1
  import { __require } from "../_virtual/_rolldown/runtime.js";
2
- import { startInactiveSpan } from "@sentry/node";
3
- import { SentryNonRecordingSpan, defineIntegration, fill, filterCollectedUrl, getClient, hasSpanStreamingEnabled, isURLObjectRelative, parseStringToURLObject, stripUrlQueryAndFragment } from "@sentry/core";
4
2
  import { HTTP_REQUEST_METHOD, SENTRY_OP, SENTRY_ORIGIN, SERVER_ADDRESS, URL_DOMAIN, URL_FULL } from "@sentry/conventions/attributes";
5
3
  import { HTTP_CLIENT } from "@sentry/conventions/op";
4
+ import { SentryNonRecordingSpan, defineIntegration, fill, filterCollectedUrl, getClient, hasSpanStreamingEnabled, isURLObjectRelative, parseStringToURLObject, stripUrlQueryAndFragment } from "@sentry/core";
5
+ import { startInactiveSpan } from "@sentry/node";
6
6
  // src/integrations/google-cloud-http.ts
7
7
  const INTEGRATION_NAME = "GoogleCloudHttp";
8
8
  const SETUP_CLIENTS = /* @__PURE__ */ new WeakMap();
@@ -1 +1 @@
1
- {"type":"module","version":"11.22.0","sideEffects":false}
1
+ {"type":"module","version":"11.23.0","sideEffects":false}
package/build/esm/sdk.js CHANGED
@@ -1,6 +1,6 @@
1
- import { gcpContextIntegration } from "./integrations/gcp-context.js";
2
- import { getDefaultIntegrationsWithoutPerformance, init as init$1 } from "@sentry/node";
3
1
  import { _INTERNAL_captureOptionsSetByUser, applySdkMetadata } from "@sentry/core";
2
+ import { getDefaultIntegrationsWithoutPerformance, init as init$1 } from "@sentry/node";
3
+ import { gcpContextIntegration } from "./integrations/gcp-context.js";
4
4
  // src/sdk.ts
5
5
  function getCjsOnlyIntegrations() {
6
6
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/google-cloud-serverless",
3
- "version": "11.22.0",
3
+ "version": "11.23.0",
4
4
  "description": "Official Sentry SDK for Google Cloud Functions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,15 +40,15 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@sentry/conventions": "^0.37.0",
43
- "@sentry/core": "11.22.0",
44
- "@sentry/node": "11.22.0",
45
- "@sentry/server-runtime-injection": "11.22.0",
46
- "@sentry/server-utils": "11.22.0"
43
+ "@sentry/core": "11.23.0",
44
+ "@sentry/node": "11.23.0",
45
+ "@sentry/server-runtime-injection": "11.23.0",
46
+ "@sentry/server-utils": "11.23.0"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@google-cloud/bigquery": "^5.3.0",
50
50
  "@google-cloud/common": "^3.4.1",
51
- "@sentry-internal/rollup-utils": "11.22.0",
51
+ "@sentry-internal/rollup-utils": "11.23.0",
52
52
  "@types/express": "^5.0.6",
53
53
  "@types/node": "^20.19.0",
54
54
  "nock": "^14.0.17"