@elizaos/server 1.6.1 → 1.6.2-alpha.2

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/dist/index.js CHANGED
@@ -12295,21 +12295,21 @@ var require_ParentBasedSampler = __commonJS((exports) => {
12295
12295
  this._localParentSampled = config.localParentSampled ?? new AlwaysOnSampler_1.AlwaysOnSampler;
12296
12296
  this._localParentNotSampled = config.localParentNotSampled ?? new AlwaysOffSampler_1.AlwaysOffSampler;
12297
12297
  }
12298
- shouldSample(context3, traceId, spanName, spanKind, attributes, links) {
12299
- const parentContext = api_1.trace.getSpanContext(context3);
12298
+ shouldSample(context2, traceId, spanName, spanKind, attributes, links) {
12299
+ const parentContext = api_1.trace.getSpanContext(context2);
12300
12300
  if (!parentContext || !(0, api_1.isSpanContextValid)(parentContext)) {
12301
- return this._root.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
12301
+ return this._root.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
12302
12302
  }
12303
12303
  if (parentContext.isRemote) {
12304
12304
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
12305
- return this._remoteParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
12305
+ return this._remoteParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
12306
12306
  }
12307
- return this._remoteParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
12307
+ return this._remoteParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
12308
12308
  }
12309
12309
  if (parentContext.traceFlags & api_1.TraceFlags.SAMPLED) {
12310
- return this._localParentSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
12310
+ return this._localParentSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
12311
12311
  }
12312
- return this._localParentNotSampled.shouldSample(context3, traceId, spanName, spanKind, attributes, links);
12312
+ return this._localParentNotSampled.shouldSample(context2, traceId, spanName, spanKind, attributes, links);
12313
12313
  }
12314
12314
  toString() {
12315
12315
  return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;
@@ -12333,7 +12333,7 @@ var require_TraceIdRatioBasedSampler = __commonJS((exports) => {
12333
12333
  this._ratio = this._normalize(_ratio);
12334
12334
  this._upperBound = Math.floor(this._ratio * 4294967295);
12335
12335
  }
12336
- shouldSample(context3, traceId) {
12336
+ shouldSample(context2, traceId) {
12337
12337
  return {
12338
12338
  decision: (0, api_1.isValidTraceId)(traceId) && this._accumulate(traceId) < this._upperBound ? Sampler_1.SamplingDecision.RECORD_AND_SAMPLED : Sampler_1.SamplingDecision.NOT_RECORD
12339
12339
  };
@@ -12729,12 +12729,12 @@ var require_Tracer = __commonJS((exports) => {
12729
12729
  this._spanProcessor = spanProcessor;
12730
12730
  this.instrumentationScope = instrumentationScope;
12731
12731
  }
12732
- startSpan(name, options = {}, context3 = api.context.active()) {
12732
+ startSpan(name, options = {}, context2 = api.context.active()) {
12733
12733
  if (options.root) {
12734
- context3 = api.trace.deleteSpan(context3);
12734
+ context2 = api.trace.deleteSpan(context2);
12735
12735
  }
12736
- const parentSpan = api.trace.getSpan(context3);
12737
- if ((0, core_1.isTracingSuppressed)(context3)) {
12736
+ const parentSpan = api.trace.getSpan(context2);
12737
+ if ((0, core_1.isTracingSuppressed)(context2)) {
12738
12738
  api.diag.debug("Instrumentation suppressed, returning Noop Span");
12739
12739
  const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);
12740
12740
  return nonRecordingSpan;
@@ -12759,7 +12759,7 @@ var require_Tracer = __commonJS((exports) => {
12759
12759
  };
12760
12760
  });
12761
12761
  const attributes = (0, core_1.sanitizeAttributes)(options.attributes);
12762
- const samplingResult = this._sampler.shouldSample(context3, traceId, name, spanKind, attributes, links);
12762
+ const samplingResult = this._sampler.shouldSample(context2, traceId, name, spanKind, attributes, links);
12763
12763
  traceState = samplingResult.traceState ?? traceState;
12764
12764
  const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED ? api.TraceFlags.SAMPLED : api.TraceFlags.NONE;
12765
12765
  const spanContext = { traceId, spanId, traceFlags, traceState };
@@ -12772,7 +12772,7 @@ var require_Tracer = __commonJS((exports) => {
12772
12772
  const span = new Span_1.SpanImpl({
12773
12773
  resource: this._resource,
12774
12774
  scope: this.instrumentationScope,
12775
- context: context3,
12775
+ context: context2,
12776
12776
  spanContext,
12777
12777
  name,
12778
12778
  kind: spanKind,
@@ -12841,9 +12841,9 @@ var require_MultiSpanProcessor = __commonJS((exports) => {
12841
12841
  });
12842
12842
  });
12843
12843
  }
12844
- onStart(span, context3) {
12844
+ onStart(span, context2) {
12845
12845
  for (const spanProcessor of this._spanProcessors) {
12846
- spanProcessor.onStart(span, context3);
12846
+ spanProcessor.onStart(span, context2);
12847
12847
  }
12848
12848
  }
12849
12849
  onEnd(span) {
@@ -13171,19 +13171,19 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
13171
13171
  ];
13172
13172
 
13173
13173
  class AbstractAsyncHooksContextManager {
13174
- bind(context7, target) {
13174
+ bind(context6, target) {
13175
13175
  if (target instanceof events_1.EventEmitter) {
13176
- return this._bindEventEmitter(context7, target);
13176
+ return this._bindEventEmitter(context6, target);
13177
13177
  }
13178
13178
  if (typeof target === "function") {
13179
- return this._bindFunction(context7, target);
13179
+ return this._bindFunction(context6, target);
13180
13180
  }
13181
13181
  return target;
13182
13182
  }
13183
- _bindFunction(context7, target) {
13183
+ _bindFunction(context6, target) {
13184
13184
  const manager = this;
13185
13185
  const contextWrapper = function(...args) {
13186
- return manager.with(context7, () => target.apply(this, args));
13186
+ return manager.with(context6, () => target.apply(this, args));
13187
13187
  };
13188
13188
  Object.defineProperty(contextWrapper, "length", {
13189
13189
  enumerable: false,
@@ -13193,7 +13193,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
13193
13193
  });
13194
13194
  return contextWrapper;
13195
13195
  }
13196
- _bindEventEmitter(context7, ee) {
13196
+ _bindEventEmitter(context6, ee) {
13197
13197
  const map = this._getPatchMap(ee);
13198
13198
  if (map !== undefined)
13199
13199
  return ee;
@@ -13201,7 +13201,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
13201
13201
  ADD_LISTENER_METHODS.forEach((methodName) => {
13202
13202
  if (ee[methodName] === undefined)
13203
13203
  return;
13204
- ee[methodName] = this._patchAddListener(ee, ee[methodName], context7);
13204
+ ee[methodName] = this._patchAddListener(ee, ee[methodName], context6);
13205
13205
  });
13206
13206
  if (typeof ee.removeListener === "function") {
13207
13207
  ee.removeListener = this._patchRemoveListener(ee, ee.removeListener);
@@ -13239,7 +13239,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
13239
13239
  return original.apply(this, arguments);
13240
13240
  };
13241
13241
  }
13242
- _patchAddListener(ee, original, context7) {
13242
+ _patchAddListener(ee, original, context6) {
13243
13243
  const contextManager = this;
13244
13244
  return function(event, listener) {
13245
13245
  if (contextManager._wrapped) {
@@ -13254,7 +13254,7 @@ var require_AbstractAsyncHooksContextManager = __commonJS((exports) => {
13254
13254
  listeners = new WeakMap;
13255
13255
  map[event] = listeners;
13256
13256
  }
13257
- const patchedListener = contextManager.bind(context7, listener);
13257
+ const patchedListener = contextManager.bind(context6, listener);
13258
13258
  listeners.set(listener, patchedListener);
13259
13259
  contextManager._wrapped = true;
13260
13260
  try {
@@ -13303,8 +13303,8 @@ var require_AsyncHooksContextManager = __commonJS((exports) => {
13303
13303
  active() {
13304
13304
  return this._stack[this._stack.length - 1] ?? api_1.ROOT_CONTEXT;
13305
13305
  }
13306
- with(context7, fn, thisArg, ...args) {
13307
- this._enterContext(context7);
13306
+ with(context6, fn, thisArg, ...args) {
13307
+ this._enterContext(context6);
13308
13308
  try {
13309
13309
  return fn.call(thisArg, ...args);
13310
13310
  } finally {
@@ -13324,25 +13324,25 @@ var require_AsyncHooksContextManager = __commonJS((exports) => {
13324
13324
  _init(uid, type) {
13325
13325
  if (type === "TIMERWRAP")
13326
13326
  return;
13327
- const context7 = this._stack[this._stack.length - 1];
13328
- if (context7 !== undefined) {
13329
- this._contexts.set(uid, context7);
13327
+ const context6 = this._stack[this._stack.length - 1];
13328
+ if (context6 !== undefined) {
13329
+ this._contexts.set(uid, context6);
13330
13330
  }
13331
13331
  }
13332
13332
  _destroy(uid) {
13333
13333
  this._contexts.delete(uid);
13334
13334
  }
13335
13335
  _before(uid) {
13336
- const context7 = this._contexts.get(uid);
13337
- if (context7 !== undefined) {
13338
- this._enterContext(context7);
13336
+ const context6 = this._contexts.get(uid);
13337
+ if (context6 !== undefined) {
13338
+ this._enterContext(context6);
13339
13339
  }
13340
13340
  }
13341
13341
  _after() {
13342
13342
  this._exitContext();
13343
13343
  }
13344
- _enterContext(context7) {
13345
- this._stack.push(context7);
13344
+ _enterContext(context6) {
13345
+ this._stack.push(context6);
13346
13346
  }
13347
13347
  _exitContext() {
13348
13348
  this._stack.pop();
@@ -13368,9 +13368,9 @@ var require_AsyncLocalStorageContextManager = __commonJS((exports) => {
13368
13368
  active() {
13369
13369
  return this._asyncLocalStorage.getStore() ?? api_1.ROOT_CONTEXT;
13370
13370
  }
13371
- with(context7, fn, thisArg, ...args) {
13371
+ with(context6, fn, thisArg, ...args) {
13372
13372
  const cb = thisArg == null ? fn : fn.bind(thisArg);
13373
- return this._asyncLocalStorage.run(context7, cb, ...args);
13373
+ return this._asyncLocalStorage.run(context6, cb, ...args);
13374
13374
  }
13375
13375
  enable() {
13376
13376
  return this;
@@ -21778,7 +21778,7 @@ var require_utils20 = __commonJS((exports) => {
21778
21778
  var types_1 = require_types3();
21779
21779
  var AttributeNames_1 = require_AttributeNames7();
21780
21780
  var semantic_conventions_1 = require_src2();
21781
- var getMiddlewareMetadata = (context12, layer, isRouter, layerPath) => {
21781
+ var getMiddlewareMetadata = (context11, layer, isRouter, layerPath) => {
21782
21782
  if (isRouter) {
21783
21783
  return {
21784
21784
  attributes: {
@@ -21786,7 +21786,7 @@ var require_utils20 = __commonJS((exports) => {
21786
21786
  [AttributeNames_1.AttributeNames.KOA_TYPE]: types_1.KoaLayerType.ROUTER,
21787
21787
  [semantic_conventions_1.SEMATTRS_HTTP_ROUTE]: layerPath?.toString()
21788
21788
  },
21789
- name: context12._matchedRouteName || `router - ${layerPath}`
21789
+ name: context11._matchedRouteName || `router - ${layerPath}`
21790
21790
  };
21791
21791
  } else {
21792
21792
  return {
@@ -21882,23 +21882,23 @@ var require_instrumentation17 = __commonJS((exports) => {
21882
21882
  }
21883
21883
  middlewareLayer[internal_types_1.kLayerPatched] = true;
21884
21884
  api2.diag.debug("patching Koa middleware layer");
21885
- return async (context12, next) => {
21885
+ return async (context11, next) => {
21886
21886
  const parent = api2.trace.getSpan(api2.context.active());
21887
21887
  if (parent === undefined) {
21888
- return middlewareLayer(context12, next);
21888
+ return middlewareLayer(context11, next);
21889
21889
  }
21890
- const metadata = (0, utils_1.getMiddlewareMetadata)(context12, middlewareLayer, isRouter, layerPath);
21890
+ const metadata = (0, utils_1.getMiddlewareMetadata)(context11, middlewareLayer, isRouter, layerPath);
21891
21891
  const span = this.tracer.startSpan(metadata.name, {
21892
21892
  attributes: metadata.attributes
21893
21893
  });
21894
21894
  const rpcMetadata = (0, core_1.getRPCMetadata)(api2.context.active());
21895
- if (rpcMetadata?.type === core_1.RPCType.HTTP && context12._matchedRoute) {
21896
- rpcMetadata.route = context12._matchedRoute.toString();
21895
+ if (rpcMetadata?.type === core_1.RPCType.HTTP && context11._matchedRoute) {
21896
+ rpcMetadata.route = context11._matchedRoute.toString();
21897
21897
  }
21898
21898
  const { requestHook: requestHook2 } = this.getConfig();
21899
21899
  if (requestHook2) {
21900
21900
  (0, instrumentation_1.safeExecuteInTheMiddle)(() => requestHook2(span, {
21901
- context: context12,
21901
+ context: context11,
21902
21902
  middlewareLayer,
21903
21903
  layerType
21904
21904
  }), (e) => {
@@ -21910,7 +21910,7 @@ var require_instrumentation17 = __commonJS((exports) => {
21910
21910
  const newContext = api2.trace.setSpan(api2.context.active(), span);
21911
21911
  return api2.context.with(newContext, async () => {
21912
21912
  try {
21913
- return await middlewareLayer(context12, next);
21913
+ return await middlewareLayer(context11, next);
21914
21914
  } catch (err) {
21915
21915
  span.recordException(err);
21916
21916
  throw err;
@@ -22615,16 +22615,16 @@ var require_utils23 = __commonJS((exports) => {
22615
22615
  return attributes;
22616
22616
  };
22617
22617
  exports.getConnectionAttributesFromUrl = getConnectionAttributesFromUrl;
22618
- var markConfirmChannelTracing = (context12) => {
22619
- return context12.setValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY, true);
22618
+ var markConfirmChannelTracing = (context11) => {
22619
+ return context11.setValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY, true);
22620
22620
  };
22621
22621
  exports.markConfirmChannelTracing = markConfirmChannelTracing;
22622
- var unmarkConfirmChannelTracing = (context12) => {
22623
- return context12.deleteValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY);
22622
+ var unmarkConfirmChannelTracing = (context11) => {
22623
+ return context11.deleteValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY);
22624
22624
  };
22625
22625
  exports.unmarkConfirmChannelTracing = unmarkConfirmChannelTracing;
22626
- var isConfirmChannelTracing = (context12) => {
22627
- return context12.getValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY) === true;
22626
+ var isConfirmChannelTracing = (context11) => {
22627
+ return context11.getValue(IS_CONFIRM_CHANNEL_CONTEXT_KEY) === true;
22628
22628
  };
22629
22629
  exports.isConfirmChannelTracing = isConfirmChannelTracing;
22630
22630
  });
@@ -28796,7 +28796,7 @@ import express30 from "express";
28796
28796
  // package.json
28797
28797
  var package_default = {
28798
28798
  name: "@elizaos/server",
28799
- version: "1.6.1",
28799
+ version: "1.6.2-alpha.2",
28800
28800
  description: "ElizaOS Server - Core server infrastructure for ElizaOS agents",
28801
28801
  publishConfig: {
28802
28802
  access: "public",
@@ -30343,7 +30343,7 @@ async function loadCharacters(charactersArg) {
30343
30343
  }
30344
30344
 
30345
30345
  // ../../node_modules/@sentry/node/build/esm/integrations/http.js
30346
- var import_api10 = __toESM(require_src(), 1);
30346
+ var import_api9 = __toESM(require_src(), 1);
30347
30347
  var import_instrumentation_http = __toESM(require_src7(), 1);
30348
30348
 
30349
30349
  // ../../node_modules/@sentry/core/build/esm/debug-build.js
@@ -30353,7 +30353,7 @@ var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
30353
30353
  var GLOBAL_OBJ = globalThis;
30354
30354
 
30355
30355
  // ../../node_modules/@sentry/core/build/esm/utils/version.js
30356
- var SDK_VERSION = "10.17.0";
30356
+ var SDK_VERSION = "10.16.0";
30357
30357
 
30358
30358
  // ../../node_modules/@sentry/core/build/esm/carrier.js
30359
30359
  function getMainCarrier() {
@@ -35870,7 +35870,7 @@ function processGenerateSpan(span, name, attributes) {
35870
35870
  span.setAttribute("ai.pipeline.name", nameWthoutAi);
35871
35871
  span.updateName(nameWthoutAi);
35872
35872
  const functionId = attributes[AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE];
35873
- if (functionId && typeof functionId === "string") {
35873
+ if (functionId && typeof functionId === "string" && name.split(".").length - 1 === 1) {
35874
35874
  span.updateName(`${nameWthoutAi} ${functionId}`);
35875
35875
  span.setAttribute("gen_ai.function_id", functionId);
35876
35876
  }
@@ -37245,6 +37245,9 @@ class LRUMap {
37245
37245
  return values;
37246
37246
  }
37247
37247
  }
37248
+ // ../../node_modules/@sentry/node-core/build/esm/debug-build.js
37249
+ var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
37250
+
37248
37251
  // ../../node_modules/@sentry/node-core/build/esm/otel/instrument.js
37249
37252
  var import_instrumentation = __toESM(require_src6(), 1);
37250
37253
  var INSTRUMENTED = {};
@@ -37314,85 +37317,76 @@ function hasWrap(instrumentation) {
37314
37317
  return typeof instrumentation["_wrap"] === "function";
37315
37318
  }
37316
37319
 
37317
- // ../../node_modules/@sentry/node-core/build/esm/integrations/http/httpServerIntegration.js
37318
- var import_api2 = __toESM(require_src(), 1);
37319
- import { subscribe } from "node:diagnostics_channel";
37320
+ // ../../node_modules/@sentry/node-core/build/esm/integrations/http/SentryHttpInstrumentation.js
37321
+ var import_api4 = __toESM(require_src(), 1);
37322
+ var import_core40 = __toESM(require_src3(), 1);
37323
+ var import_instrumentation2 = __toESM(require_src6(), 1);
37324
+ import { subscribe, unsubscribe } from "node:diagnostics_channel";
37320
37325
 
37321
- // ../../node_modules/@sentry/node-core/build/esm/debug-build.js
37322
- var DEBUG_BUILD2 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
37326
+ // ../../node_modules/@sentry/node-core/build/esm/utils/getRequestUrl.js
37327
+ function getRequestUrl(requestOptions) {
37328
+ const protocol = requestOptions.protocol || "";
37329
+ const hostname = requestOptions.hostname || requestOptions.host || "";
37330
+ const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname) ? "" : `:${requestOptions.port}`;
37331
+ const path7 = requestOptions.path ? requestOptions.path : "/";
37332
+ return `${protocol}//${hostname}${port}${path7}`;
37333
+ }
37323
37334
 
37324
37335
  // ../../node_modules/@sentry/node-core/build/esm/integrations/http/constants.js
37325
37336
  var INSTRUMENTATION_NAME = "@sentry/instrumentation-http";
37326
37337
  var MAX_BODY_BYTE_LENGTH = 1024 * 1024;
37327
37338
 
37328
- // ../../node_modules/@sentry/node-core/build/esm/integrations/http/httpServerIntegration.js
37339
+ // ../../node_modules/@sentry/node-core/build/esm/integrations/http/incoming-requests.js
37340
+ var import_api2 = __toESM(require_src(), 1);
37341
+ var import_core34 = __toESM(require_src3(), 1);
37342
+ var import_semantic_conventions = __toESM(require_src2(), 1);
37343
+ import { errorMonitor } from "events";
37329
37344
  var HTTP_SERVER_INSTRUMENTED_KEY = import_api2.createContextKey("sentry_http_server_instrumented");
37330
- var INTEGRATION_NAME6 = "Http.Server";
37331
37345
  var clientToRequestSessionAggregatesMap = new Map;
37332
37346
  var wrappedEmitFns = new WeakSet;
37333
- function addStartSpanCallback(request, callback) {
37334
- addNonEnumerableProperty(request, "_startSpanCallback", new WeakRef(callback));
37335
- }
37336
- var _httpServerIntegration = (options = {}) => {
37337
- const _options = {
37338
- sessions: options.sessions ?? true,
37339
- sessionFlushingDelayMS: options.sessionFlushingDelayMS ?? 60000,
37340
- maxRequestBodySize: options.maxRequestBodySize ?? "medium",
37341
- ignoreRequestBody: options.ignoreRequestBody
37342
- };
37343
- return {
37344
- name: INTEGRATION_NAME6,
37345
- setupOnce() {
37346
- const onHttpServerRequestStart = (_data) => {
37347
- const data = _data;
37348
- instrumentServer(data.server, _options);
37349
- };
37350
- subscribe("http.server.request.start", onHttpServerRequestStart);
37351
- },
37352
- afterAllSetup(client) {
37353
- if (DEBUG_BUILD2 && client.getIntegrationByName("Http")) {
37354
- debug.warn("It seems that you have manually added `httpServerIntegration` while `httpIntegration` is also present. Make sure to remove `httpServerIntegration` when adding `httpIntegration`.");
37355
- }
37356
- }
37357
- };
37358
- };
37359
- var httpServerIntegration = _httpServerIntegration;
37360
37347
  function instrumentServer(server, {
37361
- ignoreRequestBody,
37362
- maxRequestBodySize,
37363
- sessions: sessions2,
37364
- sessionFlushingDelayMS
37348
+ ignoreIncomingRequestBody,
37349
+ ignoreSpansForIncomingRequests,
37350
+ maxIncomingRequestBodySize = "medium",
37351
+ trackIncomingRequestsAsSessions = true,
37352
+ spans,
37353
+ ignoreStaticAssets = true,
37354
+ sessionFlushingDelayMS,
37355
+ instrumentation,
37356
+ incomingRequestSpanHook
37365
37357
  }) {
37366
37358
  const originalEmit = server.emit;
37367
37359
  if (wrappedEmitFns.has(originalEmit)) {
37360
+ DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Incoming requests already instrumented, not instrumenting again...");
37368
37361
  return;
37369
37362
  }
37363
+ const { requestHook, responseHook, applyCustomAttributesOnSpan } = instrumentation ?? {};
37370
37364
  const newEmit = new Proxy(originalEmit, {
37371
37365
  apply(target, thisArg, args) {
37372
37366
  if (args[0] !== "request") {
37373
37367
  return target.apply(thisArg, args);
37374
37368
  }
37375
- const client = getClient();
37376
- if (import_api2.context.active().getValue(HTTP_SERVER_INSTRUMENTED_KEY) || !client) {
37369
+ if (import_api2.context.active().getValue(HTTP_SERVER_INSTRUMENTED_KEY)) {
37377
37370
  return target.apply(thisArg, args);
37378
37371
  }
37379
- DEBUG_BUILD2 && debug.log(INTEGRATION_NAME6, "Handling incoming request");
37372
+ DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Handling incoming request");
37373
+ const client = getClient();
37380
37374
  const isolationScope = getIsolationScope().clone();
37381
37375
  const request = args[1];
37382
37376
  const response = args[2];
37383
37377
  const normalizedRequest = httpRequestToRequestData(request);
37384
37378
  const ipAddress = request.ip || request.socket?.remoteAddress;
37385
37379
  const url = request.url || "/";
37386
- if (maxRequestBodySize !== "none" && !ignoreRequestBody?.(url, request)) {
37387
- patchRequestToCaptureBody(request, isolationScope, maxRequestBodySize);
37380
+ if (maxIncomingRequestBodySize !== "none" && !ignoreIncomingRequestBody?.(url, request)) {
37381
+ patchRequestToCaptureBody(request, isolationScope, maxIncomingRequestBodySize);
37388
37382
  }
37389
37383
  isolationScope.setSDKProcessingMetadata({ normalizedRequest, ipAddress });
37390
37384
  const httpMethod = (request.method || "GET").toUpperCase();
37391
37385
  const httpTargetWithoutQueryFragment = stripUrlQueryAndFragment(url);
37392
37386
  const bestEffortTransactionName = `${httpMethod} ${httpTargetWithoutQueryFragment}`;
37393
37387
  isolationScope.setTransactionName(bestEffortTransactionName);
37394
- if (sessions2 && client) {
37395
- recordRequestSession(client, {
37388
+ if (trackIncomingRequestsAsSessions !== false) {
37389
+ recordRequestSession({
37396
37390
  requestIsolationScope: isolationScope,
37397
37391
  response,
37398
37392
  sessionFlushingDelayMS: sessionFlushingDelayMS ?? 60000
@@ -37402,12 +37396,79 @@ function instrumentServer(server, {
37402
37396
  getCurrentScope().getPropagationContext().propagationSpanId = generateSpanId();
37403
37397
  const ctx = import_api2.propagation.extract(import_api2.context.active(), normalizedRequest.headers).setValue(HTTP_SERVER_INSTRUMENTED_KEY, true);
37404
37398
  return import_api2.context.with(ctx, () => {
37405
- client.emit("httpServerRequest", request, response, normalizedRequest);
37406
- const callback = request._startSpanCallback?.deref();
37407
- if (callback) {
37408
- return callback(() => target.apply(thisArg, args));
37399
+ if (typeof __SENTRY_TRACING__ !== "undefined" && !__SENTRY_TRACING__ || !spans || !client || shouldIgnoreSpansForIncomingRequest(request, {
37400
+ ignoreStaticAssets,
37401
+ ignoreSpansForIncomingRequests
37402
+ })) {
37403
+ DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Skipping span creation for incoming request");
37404
+ return target.apply(thisArg, args);
37409
37405
  }
37410
- return target.apply(thisArg, args);
37406
+ const fullUrl = normalizedRequest.url || url;
37407
+ const urlObj = parseStringToURLObject(fullUrl);
37408
+ const headers = request.headers;
37409
+ const userAgent = headers["user-agent"];
37410
+ const ips = headers["x-forwarded-for"];
37411
+ const httpVersion = request.httpVersion;
37412
+ const host = headers.host;
37413
+ const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
37414
+ const tracer = client.tracer;
37415
+ const scheme = fullUrl.startsWith("https") ? "https" : "http";
37416
+ const shouldSendDefaultPii = client?.getOptions().sendDefaultPii ?? false;
37417
+ const span = tracer.startSpan(bestEffortTransactionName, {
37418
+ kind: import_api2.SpanKind.SERVER,
37419
+ attributes: {
37420
+ [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.server",
37421
+ [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.http",
37422
+ "sentry.http.prefetch": isKnownPrefetchRequest(request) || undefined,
37423
+ "http.url": fullUrl,
37424
+ "http.method": httpMethod,
37425
+ "http.target": urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
37426
+ "http.host": host,
37427
+ "net.host.name": hostname,
37428
+ "http.client_ip": typeof ips === "string" ? ips.split(",")[0] : undefined,
37429
+ "http.user_agent": userAgent,
37430
+ "http.scheme": scheme,
37431
+ "http.flavor": httpVersion,
37432
+ "net.transport": httpVersion?.toUpperCase() === "QUIC" ? "ip_udp" : "ip_tcp",
37433
+ ...getRequestContentLengthAttribute(request),
37434
+ ...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, shouldSendDefaultPii)
37435
+ }
37436
+ });
37437
+ requestHook?.(span, request);
37438
+ responseHook?.(span, response);
37439
+ applyCustomAttributesOnSpan?.(span, request, response);
37440
+ incomingRequestSpanHook?.(span, request, response);
37441
+ const rpcMetadata = {
37442
+ type: import_core34.RPCType.HTTP,
37443
+ span
37444
+ };
37445
+ import_api2.context.with(import_core34.setRPCMetadata(import_api2.trace.setSpan(import_api2.context.active(), span), rpcMetadata), () => {
37446
+ import_api2.context.bind(import_api2.context.active(), request);
37447
+ import_api2.context.bind(import_api2.context.active(), response);
37448
+ let isEnded = false;
37449
+ function endSpan(status) {
37450
+ if (isEnded) {
37451
+ return;
37452
+ }
37453
+ isEnded = true;
37454
+ const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
37455
+ span.setAttributes(newAttributes);
37456
+ span.setStatus(status);
37457
+ span.end();
37458
+ const route = newAttributes["http.route"];
37459
+ if (route) {
37460
+ getIsolationScope().setTransactionName(`${request.method?.toUpperCase() || "GET"} ${route}`);
37461
+ }
37462
+ }
37463
+ response.on("close", () => {
37464
+ endSpan(getSpanStatusFromHttpCode(response.statusCode));
37465
+ });
37466
+ response.on(errorMonitor, () => {
37467
+ const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
37468
+ endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
37469
+ });
37470
+ return target.apply(thisArg, args);
37471
+ });
37411
37472
  });
37412
37473
  });
37413
37474
  }
@@ -37415,7 +37476,7 @@ function instrumentServer(server, {
37415
37476
  wrappedEmitFns.add(newEmit);
37416
37477
  server.emit = newEmit;
37417
37478
  }
37418
- function recordRequestSession(client, {
37479
+ function recordRequestSession({
37419
37480
  requestIsolationScope,
37420
37481
  response,
37421
37482
  sessionFlushingDelayMS
@@ -37424,6 +37485,7 @@ function recordRequestSession(client, {
37424
37485
  requestSession: { status: "ok" }
37425
37486
  });
37426
37487
  response.once("close", () => {
37488
+ const client = getClient();
37427
37489
  const requestSession = requestIsolationScope.getScopeData().sdkProcessingMetadata.requestSession;
37428
37490
  if (client && requestSession) {
37429
37491
  DEBUG_BUILD2 && debug.log(`Recorded request session with status: ${requestSession.status}`);
@@ -37466,7 +37528,7 @@ function recordRequestSession(client, {
37466
37528
  function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySize) {
37467
37529
  let bodyByteLength = 0;
37468
37530
  const chunks = [];
37469
- DEBUG_BUILD2 && debug.log(INTEGRATION_NAME6, "Patching request.on");
37531
+ DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, "Patching request.on");
37470
37532
  const callbackMap = new WeakMap;
37471
37533
  const maxBodySize = maxIncomingRequestBodySize === "small" ? 1000 : maxIncomingRequestBodySize === "medium" ? 1e4 : MAX_BODY_BYTE_LENGTH;
37472
37534
  try {
@@ -37474,7 +37536,7 @@ function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySi
37474
37536
  apply: (target, thisArg, args) => {
37475
37537
  const [event, listener, ...restArgs] = args;
37476
37538
  if (event === "data") {
37477
- DEBUG_BUILD2 && debug.log(INTEGRATION_NAME6, `Handling request.on("data") with maximum body size of ${maxBodySize}b`);
37539
+ DEBUG_BUILD2 && debug.log(INSTRUMENTATION_NAME, `Handling request.on("data") with maximum body size of ${maxBodySize}b`);
37478
37540
  const callback = new Proxy(listener, {
37479
37541
  apply: (target2, thisArg2, args2) => {
37480
37542
  try {
@@ -37484,10 +37546,10 @@ function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySi
37484
37546
  chunks.push(bufferifiedChunk);
37485
37547
  bodyByteLength += bufferifiedChunk.byteLength;
37486
37548
  } else if (DEBUG_BUILD2) {
37487
- debug.log(INTEGRATION_NAME6, `Dropping request body chunk because maximum body length of ${maxBodySize}b is exceeded.`);
37549
+ debug.log(INSTRUMENTATION_NAME, `Dropping request body chunk because maximum body length of ${maxBodySize}b is exceeded.`);
37488
37550
  }
37489
37551
  } catch (err) {
37490
- DEBUG_BUILD2 && debug.error(INTEGRATION_NAME6, "Encountered error while storing body chunk.");
37552
+ DEBUG_BUILD2 && debug.error(INSTRUMENTATION_NAME, "Encountered error while storing body chunk.");
37491
37553
  }
37492
37554
  return Reflect.apply(target2, thisArg2, args2);
37493
37555
  }
@@ -37521,182 +37583,15 @@ function patchRequestToCaptureBody(req, isolationScope, maxIncomingRequestBodySi
37521
37583
  }
37522
37584
  } catch (error2) {
37523
37585
  if (DEBUG_BUILD2) {
37524
- debug.error(INTEGRATION_NAME6, "Error building captured request body", error2);
37586
+ debug.error(INSTRUMENTATION_NAME, "Error building captured request body", error2);
37525
37587
  }
37526
37588
  }
37527
37589
  });
37528
37590
  } catch (error2) {
37529
37591
  if (DEBUG_BUILD2) {
37530
- debug.error(INTEGRATION_NAME6, "Error patching request to capture body", error2);
37531
- }
37532
- }
37533
- }
37534
-
37535
- // ../../node_modules/@sentry/node-core/build/esm/integrations/http/httpServerSpansIntegration.js
37536
- var import_api3 = __toESM(require_src(), 1);
37537
- var import_core35 = __toESM(require_src3(), 1);
37538
- var import_semantic_conventions = __toESM(require_src2(), 1);
37539
- import { errorMonitor } from "node:events";
37540
- var INTEGRATION_NAME7 = "Http.ServerSpans";
37541
- var _httpServerSpansIntegration = (options = {}) => {
37542
- const ignoreStaticAssets = options.ignoreStaticAssets ?? true;
37543
- const ignoreIncomingRequests = options.ignoreIncomingRequests;
37544
- const ignoreStatusCodes = options.ignoreStatusCodes ?? [
37545
- [401, 404],
37546
- [301, 303],
37547
- [305, 399]
37548
- ];
37549
- const { onSpanCreated } = options;
37550
- const { requestHook, responseHook, applyCustomAttributesOnSpan } = options.instrumentation ?? {};
37551
- return {
37552
- name: INTEGRATION_NAME7,
37553
- setup(client) {
37554
- if (typeof __SENTRY_TRACING__ !== "undefined" && !__SENTRY_TRACING__) {
37555
- return;
37556
- }
37557
- client.on("httpServerRequest", (_request, _response, normalizedRequest) => {
37558
- const request = _request;
37559
- const response = _response;
37560
- const startSpan2 = (next) => {
37561
- if (shouldIgnoreSpansForIncomingRequest(request, {
37562
- ignoreStaticAssets,
37563
- ignoreIncomingRequests
37564
- })) {
37565
- DEBUG_BUILD2 && debug.log(INTEGRATION_NAME7, "Skipping span creation for incoming request", request.url);
37566
- return next();
37567
- }
37568
- const fullUrl = normalizedRequest.url || request.url || "/";
37569
- const urlObj = parseStringToURLObject(fullUrl);
37570
- const headers = request.headers;
37571
- const userAgent = headers["user-agent"];
37572
- const ips = headers["x-forwarded-for"];
37573
- const httpVersion = request.httpVersion;
37574
- const host = headers.host;
37575
- const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
37576
- const tracer = client.tracer;
37577
- const scheme = fullUrl.startsWith("https") ? "https" : "http";
37578
- const method = normalizedRequest.method || request.method?.toUpperCase() || "GET";
37579
- const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);
37580
- const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;
37581
- const shouldSendDefaultPii = client.getOptions().sendDefaultPii ?? false;
37582
- const span = tracer.startSpan(bestEffortTransactionName, {
37583
- kind: import_api3.SpanKind.SERVER,
37584
- attributes: {
37585
- [SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.server",
37586
- [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.http",
37587
- "sentry.http.prefetch": isKnownPrefetchRequest(request) || undefined,
37588
- "http.url": fullUrl,
37589
- "http.method": normalizedRequest.method,
37590
- "http.target": urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
37591
- "http.host": host,
37592
- "net.host.name": hostname,
37593
- "http.client_ip": typeof ips === "string" ? ips.split(",")[0] : undefined,
37594
- "http.user_agent": userAgent,
37595
- "http.scheme": scheme,
37596
- "http.flavor": httpVersion,
37597
- "net.transport": httpVersion?.toUpperCase() === "QUIC" ? "ip_udp" : "ip_tcp",
37598
- ...getRequestContentLengthAttribute(request),
37599
- ...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, shouldSendDefaultPii)
37600
- }
37601
- });
37602
- requestHook?.(span, request);
37603
- responseHook?.(span, response);
37604
- applyCustomAttributesOnSpan?.(span, request, response);
37605
- onSpanCreated?.(span, request, response);
37606
- const rpcMetadata = {
37607
- type: import_core35.RPCType.HTTP,
37608
- span
37609
- };
37610
- return import_api3.context.with(import_core35.setRPCMetadata(import_api3.trace.setSpan(import_api3.context.active(), span), rpcMetadata), () => {
37611
- import_api3.context.bind(import_api3.context.active(), request);
37612
- import_api3.context.bind(import_api3.context.active(), response);
37613
- let isEnded = false;
37614
- function endSpan(status) {
37615
- if (isEnded) {
37616
- return;
37617
- }
37618
- isEnded = true;
37619
- const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
37620
- span.setAttributes(newAttributes);
37621
- span.setStatus(status);
37622
- span.end();
37623
- const route = newAttributes["http.route"];
37624
- if (route) {
37625
- getIsolationScope().setTransactionName(`${request.method?.toUpperCase() || "GET"} ${route}`);
37626
- }
37627
- }
37628
- response.on("close", () => {
37629
- endSpan(getSpanStatusFromHttpCode(response.statusCode));
37630
- });
37631
- response.on(errorMonitor, () => {
37632
- const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
37633
- endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
37634
- });
37635
- return next();
37636
- });
37637
- };
37638
- addStartSpanCallback(request, startSpan2);
37639
- });
37640
- },
37641
- processEvent(event) {
37642
- if (event.type === "transaction") {
37643
- const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
37644
- if (typeof statusCode === "number") {
37645
- const shouldDrop = shouldFilterStatusCode(statusCode, ignoreStatusCodes);
37646
- if (shouldDrop) {
37647
- DEBUG_BUILD2 && debug.log("Dropping transaction due to status code", statusCode);
37648
- return null;
37649
- }
37650
- }
37651
- }
37652
- return event;
37653
- },
37654
- afterAllSetup(client) {
37655
- if (!DEBUG_BUILD2) {
37656
- return;
37657
- }
37658
- if (client.getIntegrationByName("Http")) {
37659
- debug.warn("It seems that you have manually added `httpServerSpansIntergation` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`.");
37660
- }
37661
- if (!client.getIntegrationByName("Http.Server")) {
37662
- debug.error("It seems that you have manually added `httpServerSpansIntergation` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration.");
37663
- }
37592
+ debug.error(INSTRUMENTATION_NAME, "Error patching request to capture body", error2);
37664
37593
  }
37665
- };
37666
- };
37667
- var httpServerSpansIntegration = _httpServerSpansIntegration;
37668
- function isKnownPrefetchRequest(req) {
37669
- return req.headers["next-router-prefetch"] === "1";
37670
- }
37671
- function isStaticAssetRequest(urlPath) {
37672
- const path7 = stripUrlQueryAndFragment(urlPath);
37673
- if (path7.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
37674
- return true;
37675
37594
  }
37676
- if (path7.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
37677
- return true;
37678
- }
37679
- return false;
37680
- }
37681
- function shouldIgnoreSpansForIncomingRequest(request, {
37682
- ignoreStaticAssets,
37683
- ignoreIncomingRequests
37684
- }) {
37685
- if (import_core35.isTracingSuppressed(import_api3.context.active())) {
37686
- return true;
37687
- }
37688
- const urlPath = request.url;
37689
- const method = request.method?.toUpperCase();
37690
- if (method === "OPTIONS" || method === "HEAD" || !urlPath) {
37691
- return true;
37692
- }
37693
- if (ignoreStaticAssets && method === "GET" && isStaticAssetRequest(urlPath)) {
37694
- return true;
37695
- }
37696
- if (ignoreIncomingRequests?.(urlPath, request)) {
37697
- return true;
37698
- }
37699
- return false;
37700
37595
  }
37701
37596
  function getRequestContentLengthAttribute(request) {
37702
37597
  const length = getContentLength(request.headers);
@@ -37734,7 +37629,7 @@ function getIncomingRequestAttributesOnResponse(request, response) {
37734
37629
  [import_semantic_conventions.SEMATTRS_HTTP_STATUS_CODE]: statusCode,
37735
37630
  "http.status_text": statusMessage?.toUpperCase()
37736
37631
  };
37737
- const rpcMetadata = import_core35.getRPCMetadata(import_api3.context.active());
37632
+ const rpcMetadata = import_core34.getRPCMetadata(import_api2.context.active());
37738
37633
  if (socket) {
37739
37634
  const { localAddress, localPort, remoteAddress, remotePort } = socket;
37740
37635
  newAttributes[import_semantic_conventions.SEMATTRS_NET_HOST_IP] = localAddress;
@@ -37744,42 +37639,51 @@ function getIncomingRequestAttributesOnResponse(request, response) {
37744
37639
  }
37745
37640
  newAttributes[import_semantic_conventions.SEMATTRS_HTTP_STATUS_CODE] = statusCode;
37746
37641
  newAttributes["http.status_text"] = (statusMessage || "").toUpperCase();
37747
- if (rpcMetadata?.type === import_core35.RPCType.HTTP && rpcMetadata.route !== undefined) {
37642
+ if (rpcMetadata?.type === import_core34.RPCType.HTTP && rpcMetadata.route !== undefined) {
37748
37643
  const routeName = rpcMetadata.route;
37749
37644
  newAttributes[import_semantic_conventions.ATTR_HTTP_ROUTE] = routeName;
37750
37645
  }
37751
37646
  return newAttributes;
37752
37647
  }
37753
- function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
37754
- return dropForStatusCodes.some((code) => {
37755
- if (typeof code === "number") {
37756
- return code === statusCode;
37757
- }
37758
- const [min, max] = code;
37759
- return statusCode >= min && statusCode <= max;
37760
- });
37648
+ function isKnownPrefetchRequest(req) {
37649
+ return req.headers["next-router-prefetch"] === "1";
37761
37650
  }
37762
-
37763
- // ../../node_modules/@sentry/node-core/build/esm/integrations/http/SentryHttpInstrumentation.js
37764
- var import_api5 = __toESM(require_src(), 1);
37765
- var import_core41 = __toESM(require_src3(), 1);
37766
- var import_instrumentation2 = __toESM(require_src6(), 1);
37767
- import { subscribe as subscribe2, unsubscribe } from "node:diagnostics_channel";
37768
-
37769
- // ../../node_modules/@sentry/node-core/build/esm/utils/getRequestUrl.js
37770
- function getRequestUrl(requestOptions) {
37771
- const protocol = requestOptions.protocol || "";
37772
- const hostname = requestOptions.hostname || requestOptions.host || "";
37773
- const port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 || /^(.*):(\d+)$/.test(hostname) ? "" : `:${requestOptions.port}`;
37774
- const path7 = requestOptions.path ? requestOptions.path : "/";
37775
- return `${protocol}//${hostname}${port}${path7}`;
37651
+ function isStaticAssetRequest(urlPath) {
37652
+ const path7 = stripUrlQueryAndFragment(urlPath);
37653
+ if (path7.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
37654
+ return true;
37655
+ }
37656
+ if (path7.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
37657
+ return true;
37658
+ }
37659
+ return false;
37660
+ }
37661
+ function shouldIgnoreSpansForIncomingRequest(request, {
37662
+ ignoreStaticAssets,
37663
+ ignoreSpansForIncomingRequests
37664
+ }) {
37665
+ if (import_core34.isTracingSuppressed(import_api2.context.active())) {
37666
+ return true;
37667
+ }
37668
+ const urlPath = request.url;
37669
+ const method = request.method?.toUpperCase();
37670
+ if (method === "OPTIONS" || method === "HEAD" || !urlPath) {
37671
+ return true;
37672
+ }
37673
+ if (ignoreStaticAssets && method === "GET" && isStaticAssetRequest(urlPath)) {
37674
+ return true;
37675
+ }
37676
+ if (ignoreSpansForIncomingRequests?.(urlPath, request)) {
37677
+ return true;
37678
+ }
37679
+ return false;
37776
37680
  }
37777
37681
 
37778
37682
  // ../../node_modules/@sentry/opentelemetry/build/esm/index.js
37779
37683
  var import_semantic_conventions2 = __toESM(require_src2(), 1);
37780
37684
  var api = __toESM(require_src(), 1);
37781
- var import_api4 = __toESM(require_src(), 1);
37782
- var import_core38 = __toESM(require_src3(), 1);
37685
+ var import_api3 = __toESM(require_src(), 1);
37686
+ var import_core37 = __toESM(require_src3(), 1);
37783
37687
  var import_sdk_trace_base = __toESM(require_src9(), 1);
37784
37688
  var SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE = "sentry.parentIsRemote";
37785
37689
  var SEMANTIC_ATTRIBUTE_SENTRY_GRAPHQL_OPERATION = "sentry.graphql.operation";
@@ -37837,7 +37741,7 @@ function getSpanKind(span) {
37837
37741
  if (spanHasKind(span)) {
37838
37742
  return span.kind;
37839
37743
  }
37840
- return import_api4.SpanKind.INTERNAL;
37744
+ return import_api3.SpanKind.INTERNAL;
37841
37745
  }
37842
37746
  var SENTRY_TRACE_HEADER = "sentry-trace";
37843
37747
  var SENTRY_BAGGAGE_HEADER = "baggage";
@@ -37846,19 +37750,19 @@ var SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING = "sentry.sampled_not_recording";
37846
37750
  var SENTRY_TRACE_STATE_URL = "sentry.url";
37847
37751
  var SENTRY_TRACE_STATE_SAMPLE_RAND = "sentry.sample_rand";
37848
37752
  var SENTRY_TRACE_STATE_SAMPLE_RATE = "sentry.sample_rate";
37849
- var SENTRY_SCOPES_CONTEXT_KEY = import_api4.createContextKey("sentry_scopes");
37850
- var SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY = import_api4.createContextKey("sentry_fork_isolation_scope");
37851
- var SENTRY_FORK_SET_SCOPE_CONTEXT_KEY = import_api4.createContextKey("sentry_fork_set_scope");
37852
- var SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY = import_api4.createContextKey("sentry_fork_set_isolation_scope");
37753
+ var SENTRY_SCOPES_CONTEXT_KEY = import_api3.createContextKey("sentry_scopes");
37754
+ var SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY = import_api3.createContextKey("sentry_fork_isolation_scope");
37755
+ var SENTRY_FORK_SET_SCOPE_CONTEXT_KEY = import_api3.createContextKey("sentry_fork_set_scope");
37756
+ var SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY = import_api3.createContextKey("sentry_fork_set_isolation_scope");
37853
37757
  var SCOPE_CONTEXT_FIELD = "_scopeContext";
37854
- function getScopesFromContext(context5) {
37855
- return context5.getValue(SENTRY_SCOPES_CONTEXT_KEY);
37758
+ function getScopesFromContext(context4) {
37759
+ return context4.getValue(SENTRY_SCOPES_CONTEXT_KEY);
37856
37760
  }
37857
- function setScopesOnContext(context5, scopes) {
37858
- return context5.setValue(SENTRY_SCOPES_CONTEXT_KEY, scopes);
37761
+ function setScopesOnContext(context4, scopes) {
37762
+ return context4.setValue(SENTRY_SCOPES_CONTEXT_KEY, scopes);
37859
37763
  }
37860
- function setContextOnScope(scope, context5) {
37861
- addNonEnumerableProperty(scope, SCOPE_CONTEXT_FIELD, context5);
37764
+ function setContextOnScope(scope, context4) {
37765
+ addNonEnumerableProperty(scope, SCOPE_CONTEXT_FIELD, context4);
37862
37766
  }
37863
37767
  function getContextFromScope(scope) {
37864
37768
  return scope[SCOPE_CONTEXT_FIELD];
@@ -37866,7 +37770,7 @@ function getContextFromScope(scope) {
37866
37770
  function getSamplingDecision(spanContext) {
37867
37771
  const { traceFlags, traceState } = spanContext;
37868
37772
  const sampledNotRecording = traceState ? traceState.get(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING) === "1" : false;
37869
- if (traceFlags === import_api4.TraceFlags.SAMPLED) {
37773
+ if (traceFlags === import_api3.TraceFlags.SAMPLED) {
37870
37774
  return true;
37871
37775
  }
37872
37776
  if (sampledNotRecording) {
@@ -37941,10 +37845,10 @@ function descriptionForDbSystem({ attributes, name }) {
37941
37845
  function descriptionForHttpMethod({ name, kind, attributes }, httpMethod) {
37942
37846
  const opParts = ["http"];
37943
37847
  switch (kind) {
37944
- case import_api4.SpanKind.CLIENT:
37848
+ case import_api3.SpanKind.CLIENT:
37945
37849
  opParts.push("client");
37946
37850
  break;
37947
- case import_api4.SpanKind.SERVER:
37851
+ case import_api3.SpanKind.SERVER:
37948
37852
  opParts.push("server");
37949
37853
  break;
37950
37854
  }
@@ -37969,7 +37873,7 @@ function descriptionForHttpMethod({ name, kind, attributes }, httpMethod) {
37969
37873
  if (fragment) {
37970
37874
  data["http.fragment"] = fragment;
37971
37875
  }
37972
- const isClientOrServerKind = kind === import_api4.SpanKind.CLIENT || kind === import_api4.SpanKind.SERVER;
37876
+ const isClientOrServerKind = kind === import_api3.SpanKind.CLIENT || kind === import_api3.SpanKind.SERVER;
37973
37877
  const origin = attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] || "manual";
37974
37878
  const isManualSpan = !`${origin}`.startsWith("auto");
37975
37879
  const alreadyHasCustomSource = attributes[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE] === "custom";
@@ -38005,7 +37909,7 @@ function getSanitizedUrl(attributes, kind) {
38005
37909
  if (typeof httpRoute === "string") {
38006
37910
  return { urlPath: httpRoute, url, query, fragment, hasRoute: true };
38007
37911
  }
38008
- if (kind === import_api4.SpanKind.SERVER && typeof httpTarget === "string") {
37912
+ if (kind === import_api3.SpanKind.SERVER && typeof httpTarget === "string") {
38009
37913
  return { urlPath: stripUrlQueryAndFragment(httpTarget), url, query, fragment, hasRoute: false };
38010
37914
  }
38011
37915
  if (parsedUrl) {
@@ -38046,7 +37950,7 @@ function enhanceDscWithOpenTelemetryRootSpanName(client) {
38046
37950
  });
38047
37951
  }
38048
37952
  function getActiveSpan2() {
38049
- return import_api4.trace.getActiveSpan();
37953
+ return import_api3.trace.getActiveSpan();
38050
37954
  }
38051
37955
  var DEBUG_BUILD3 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
38052
37956
  function makeTraceState({
@@ -38054,7 +37958,7 @@ function makeTraceState({
38054
37958
  sampled
38055
37959
  }) {
38056
37960
  const dscString = dsc ? dynamicSamplingContextToSentryBaggageHeader(dsc) : undefined;
38057
- const traceStateBase = new import_core38.TraceState;
37961
+ const traceStateBase = new import_core37.TraceState;
38058
37962
  const traceStateWithDsc = dscString ? traceStateBase.set(SENTRY_TRACE_STATE_DSC, dscString) : traceStateBase;
38059
37963
  return sampled === false ? traceStateWithDsc.set(SENTRY_TRACE_STATE_SAMPLED_NOT_RECORDING, "1") : traceStateWithDsc;
38060
37964
  }
@@ -38066,18 +37970,18 @@ function setIsSetup(element) {
38066
37970
  setupElements.add(element);
38067
37971
  }
38068
37972
 
38069
- class SentryPropagator extends import_core38.W3CBaggagePropagator {
37973
+ class SentryPropagator extends import_core37.W3CBaggagePropagator {
38070
37974
  constructor() {
38071
37975
  super();
38072
37976
  setIsSetup("SentryPropagator");
38073
37977
  this._urlMatchesTargetsMap = new LRUMap(100);
38074
37978
  }
38075
- inject(context5, carrier, setter) {
38076
- if (import_core38.isTracingSuppressed(context5)) {
37979
+ inject(context4, carrier, setter) {
37980
+ if (import_core37.isTracingSuppressed(context4)) {
38077
37981
  DEBUG_BUILD3 && debug.log("[Tracing] Not injecting trace data for url because tracing is suppressed.");
38078
37982
  return;
38079
37983
  }
38080
- const activeSpan = import_api4.trace.getSpan(context5);
37984
+ const activeSpan = import_api3.trace.getSpan(context4);
38081
37985
  const url = activeSpan && getCurrentURL(activeSpan);
38082
37986
  const tracePropagationTargets = getClient()?.getOptions()?.tracePropagationTargets;
38083
37987
  if (!shouldPropagateTraceForUrl(url, tracePropagationTargets, this._urlMatchesTargetsMap)) {
@@ -38085,8 +37989,8 @@ class SentryPropagator extends import_core38.W3CBaggagePropagator {
38085
37989
  return;
38086
37990
  }
38087
37991
  const existingBaggageHeader = getExistingBaggage(carrier);
38088
- let baggage = import_api4.propagation.getBaggage(context5) || import_api4.propagation.createBaggage({});
38089
- const { dynamicSamplingContext, traceId, spanId, sampled } = getInjectionData(context5);
37992
+ let baggage = import_api3.propagation.getBaggage(context4) || import_api3.propagation.createBaggage({});
37993
+ const { dynamicSamplingContext, traceId, spanId, sampled } = getInjectionData(context4);
38090
37994
  if (existingBaggageHeader) {
38091
37995
  const baggageEntries = parseBaggageHeader(existingBaggageHeader);
38092
37996
  if (baggageEntries) {
@@ -38103,16 +38007,16 @@ class SentryPropagator extends import_core38.W3CBaggagePropagator {
38103
38007
  return b;
38104
38008
  }, baggage);
38105
38009
  }
38106
- if (traceId && traceId !== import_api4.INVALID_TRACEID) {
38010
+ if (traceId && traceId !== import_api3.INVALID_TRACEID) {
38107
38011
  setter.set(carrier, SENTRY_TRACE_HEADER, generateSentryTraceHeader(traceId, spanId, sampled));
38108
38012
  }
38109
- super.inject(import_api4.propagation.setBaggage(context5, baggage), carrier, setter);
38013
+ super.inject(import_api3.propagation.setBaggage(context4, baggage), carrier, setter);
38110
38014
  }
38111
- extract(context5, carrier, getter) {
38015
+ extract(context4, carrier, getter) {
38112
38016
  const maybeSentryTraceHeader = getter.get(carrier, SENTRY_TRACE_HEADER);
38113
38017
  const baggage = getter.get(carrier, SENTRY_BAGGAGE_HEADER);
38114
38018
  const sentryTrace = maybeSentryTraceHeader ? Array.isArray(maybeSentryTraceHeader) ? maybeSentryTraceHeader[0] : maybeSentryTraceHeader : undefined;
38115
- return ensureScopesOnContext(getContextWithRemoteActiveSpan(context5, { sentryTrace, baggage }));
38019
+ return ensureScopesOnContext(getContextWithRemoteActiveSpan(context4, { sentryTrace, baggage }));
38116
38020
  }
38117
38021
  fields() {
38118
38022
  return [SENTRY_TRACE_HEADER, SENTRY_BAGGAGE_HEADER];
@@ -38133,8 +38037,8 @@ function shouldPropagateTraceForUrl(url, tracePropagationTargets, decisionMap) {
38133
38037
  DEBUG_BUILD3 && !decision && debug.log(NOT_PROPAGATED_MESSAGE, url);
38134
38038
  return decision;
38135
38039
  }
38136
- function getInjectionData(context5, options = {}) {
38137
- const span = import_api4.trace.getSpan(context5);
38040
+ function getInjectionData(context4, options = {}) {
38041
+ const span = import_api3.trace.getSpan(context4);
38138
38042
  if (span?.spanContext().isRemote) {
38139
38043
  const spanContext = span.spanContext();
38140
38044
  const dynamicSamplingContext2 = getDynamicSamplingContextFromSpan(span);
@@ -38155,7 +38059,7 @@ function getInjectionData(context5, options = {}) {
38155
38059
  sampled: getSamplingDecision(spanContext)
38156
38060
  };
38157
38061
  }
38158
- const scope = options.scope || getScopesFromContext(context5)?.scope || getCurrentScope();
38062
+ const scope = options.scope || getScopesFromContext(context4)?.scope || getCurrentScope();
38159
38063
  const client = options.client || getClient();
38160
38064
  const propagationContext = scope.getPropagationContext();
38161
38065
  const dynamicSamplingContext = client ? getDynamicSamplingContextFromScope(client, scope) : undefined;
@@ -38180,11 +38084,11 @@ function getContextWithRemoteActiveSpan(ctx, { sentryTrace, baggage }) {
38180
38084
  sampled,
38181
38085
  dsc
38182
38086
  });
38183
- return import_api4.trace.setSpanContext(ctx, spanContext);
38087
+ return import_api3.trace.setSpanContext(ctx, spanContext);
38184
38088
  }
38185
38089
  function continueTraceAsRemoteSpan(ctx, options, callback) {
38186
38090
  const ctxWithSpanContext = ensureScopesOnContext(getContextWithRemoteActiveSpan(ctx, options));
38187
- return import_api4.context.with(ctxWithSpanContext, callback);
38091
+ return import_api3.context.with(ctxWithSpanContext, callback);
38188
38092
  }
38189
38093
  function ensureScopesOnContext(ctx) {
38190
38094
  const scopes = getScopesFromContext(ctx);
@@ -38228,7 +38132,7 @@ function generateRemoteSpanContext({
38228
38132
  traceId,
38229
38133
  spanId,
38230
38134
  isRemote: true,
38231
- traceFlags: sampled ? import_api4.TraceFlags.SAMPLED : import_api4.TraceFlags.NONE,
38135
+ traceFlags: sampled ? import_api3.TraceFlags.SAMPLED : import_api3.TraceFlags.NONE,
38232
38136
  traceState
38233
38137
  };
38234
38138
  return spanContext;
@@ -38239,13 +38143,13 @@ function startSpan2(options, callback) {
38239
38143
  const wrapper = getActiveSpanWrapper2(customParentSpan);
38240
38144
  return wrapper(() => {
38241
38145
  const activeCtx = getContext(options.scope, options.forceTransaction);
38242
- const shouldSkipSpan = options.onlyIfParent && !import_api4.trace.getSpan(activeCtx);
38243
- const ctx = shouldSkipSpan ? import_core38.suppressTracing(activeCtx) : activeCtx;
38146
+ const shouldSkipSpan = options.onlyIfParent && !import_api3.trace.getSpan(activeCtx);
38147
+ const ctx = shouldSkipSpan ? import_core37.suppressTracing(activeCtx) : activeCtx;
38244
38148
  const spanOptions = getSpanOptions(options);
38245
38149
  return tracer.startActiveSpan(name, spanOptions, ctx, (span) => {
38246
38150
  return handleCallbackErrors(() => callback(span), () => {
38247
38151
  if (spanToJSON(span).status === undefined) {
38248
- span.setStatus({ code: import_api4.SpanStatusCode.ERROR });
38152
+ span.setStatus({ code: import_api3.SpanStatusCode.ERROR });
38249
38153
  }
38250
38154
  }, () => span.end());
38251
38155
  });
@@ -38257,13 +38161,13 @@ function startSpanManual2(options, callback) {
38257
38161
  const wrapper = getActiveSpanWrapper2(customParentSpan);
38258
38162
  return wrapper(() => {
38259
38163
  const activeCtx = getContext(options.scope, options.forceTransaction);
38260
- const shouldSkipSpan = options.onlyIfParent && !import_api4.trace.getSpan(activeCtx);
38261
- const ctx = shouldSkipSpan ? import_core38.suppressTracing(activeCtx) : activeCtx;
38164
+ const shouldSkipSpan = options.onlyIfParent && !import_api3.trace.getSpan(activeCtx);
38165
+ const ctx = shouldSkipSpan ? import_core37.suppressTracing(activeCtx) : activeCtx;
38262
38166
  const spanOptions = getSpanOptions(options);
38263
38167
  return tracer.startActiveSpan(name, spanOptions, ctx, (span) => {
38264
38168
  return handleCallbackErrors(() => callback(span, () => span.end()), () => {
38265
38169
  if (spanToJSON(span).status === undefined) {
38266
- span.setStatus({ code: import_api4.SpanStatusCode.ERROR });
38170
+ span.setStatus({ code: import_api3.SpanStatusCode.ERROR });
38267
38171
  }
38268
38172
  });
38269
38173
  });
@@ -38275,20 +38179,20 @@ function startInactiveSpan2(options) {
38275
38179
  const wrapper = getActiveSpanWrapper2(customParentSpan);
38276
38180
  return wrapper(() => {
38277
38181
  const activeCtx = getContext(options.scope, options.forceTransaction);
38278
- const shouldSkipSpan = options.onlyIfParent && !import_api4.trace.getSpan(activeCtx);
38279
- const ctx = shouldSkipSpan ? import_core38.suppressTracing(activeCtx) : activeCtx;
38182
+ const shouldSkipSpan = options.onlyIfParent && !import_api3.trace.getSpan(activeCtx);
38183
+ const ctx = shouldSkipSpan ? import_core37.suppressTracing(activeCtx) : activeCtx;
38280
38184
  const spanOptions = getSpanOptions(options);
38281
38185
  const span = tracer.startSpan(name, spanOptions, ctx);
38282
38186
  return span;
38283
38187
  });
38284
38188
  }
38285
38189
  function withActiveSpan2(span, callback) {
38286
- const newContextWithActiveSpan = span ? import_api4.trace.setSpan(import_api4.context.active(), span) : import_api4.trace.deleteSpan(import_api4.context.active());
38287
- return import_api4.context.with(newContextWithActiveSpan, () => callback(getCurrentScope()));
38190
+ const newContextWithActiveSpan = span ? import_api3.trace.setSpan(import_api3.context.active(), span) : import_api3.trace.deleteSpan(import_api3.context.active());
38191
+ return import_api3.context.with(newContextWithActiveSpan, () => callback(getCurrentScope()));
38288
38192
  }
38289
38193
  function getTracer() {
38290
38194
  const client = getClient();
38291
- return client?.tracer || import_api4.trace.getTracer("@sentry/opentelemetry", SDK_VERSION);
38195
+ return client?.tracer || import_api3.trace.getTracer("@sentry/opentelemetry", SDK_VERSION);
38292
38196
  }
38293
38197
  function getSpanOptions(options) {
38294
38198
  const { startTime, attributes, kind, op, links } = options;
@@ -38309,14 +38213,14 @@ function ensureTimestampInMilliseconds(timestamp) {
38309
38213
  }
38310
38214
  function getContext(scope, forceTransaction) {
38311
38215
  const ctx = getContextForScope(scope);
38312
- const parentSpan = import_api4.trace.getSpan(ctx);
38216
+ const parentSpan = import_api3.trace.getSpan(ctx);
38313
38217
  if (!parentSpan) {
38314
38218
  return ctx;
38315
38219
  }
38316
38220
  if (!forceTransaction) {
38317
38221
  return ctx;
38318
38222
  }
38319
- const ctxWithoutSpan = import_api4.trace.deleteSpan(ctx);
38223
+ const ctxWithoutSpan = import_api3.trace.deleteSpan(ctx);
38320
38224
  const { spanId, traceId } = parentSpan.spanContext();
38321
38225
  const sampled = getSamplingDecision(parentSpan.spanContext());
38322
38226
  const rootSpan = getRootSpan(parentSpan);
@@ -38329,10 +38233,10 @@ function getContext(scope, forceTransaction) {
38329
38233
  traceId,
38330
38234
  spanId,
38331
38235
  isRemote: true,
38332
- traceFlags: sampled ? import_api4.TraceFlags.SAMPLED : import_api4.TraceFlags.NONE,
38236
+ traceFlags: sampled ? import_api3.TraceFlags.SAMPLED : import_api3.TraceFlags.NONE,
38333
38237
  traceState
38334
38238
  };
38335
- const ctxWithSpanContext = import_api4.trace.setSpanContext(ctxWithoutSpan, spanOptions);
38239
+ const ctxWithSpanContext = import_api3.trace.setSpanContext(ctxWithoutSpan, spanOptions);
38336
38240
  return ctxWithSpanContext;
38337
38241
  }
38338
38242
  function getContextForScope(scope) {
@@ -38342,14 +38246,14 @@ function getContextForScope(scope) {
38342
38246
  return ctx;
38343
38247
  }
38344
38248
  }
38345
- return import_api4.context.active();
38249
+ return import_api3.context.active();
38346
38250
  }
38347
38251
  function continueTrace2(options, callback) {
38348
- return continueTraceAsRemoteSpan(import_api4.context.active(), options, callback);
38252
+ return continueTraceAsRemoteSpan(import_api3.context.active(), options, callback);
38349
38253
  }
38350
38254
  function getTraceContextForScope(client, scope) {
38351
38255
  const ctx = getContextFromScope(scope);
38352
- const span = ctx && import_api4.trace.getSpan(ctx);
38256
+ const span = ctx && import_api3.trace.getSpan(ctx);
38353
38257
  const traceContext = span ? spanToTraceContext(span) : getTraceContextFromScope(scope);
38354
38258
  const dynamicSamplingContext = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
38355
38259
  return [dynamicSamplingContext, traceContext];
@@ -38360,8 +38264,8 @@ function getActiveSpanWrapper2(parentSpan) {
38360
38264
  } : (callback) => callback();
38361
38265
  }
38362
38266
  function suppressTracing2(callback) {
38363
- const ctx = import_core38.suppressTracing(import_api4.context.active());
38364
- return import_api4.context.with(ctx, callback);
38267
+ const ctx = import_core37.suppressTracing(import_api3.context.active());
38268
+ return import_api3.context.with(ctx, callback);
38365
38269
  }
38366
38270
  function setupEventContextTrace(client) {
38367
38271
  client.on("preprocessEvent", (event) => {
@@ -38463,17 +38367,17 @@ function wrapContextManagerClass(ContextManagerClass) {
38463
38367
  super(...args);
38464
38368
  setIsSetup("SentryContextManager");
38465
38369
  }
38466
- with(context5, fn, thisArg, ...args) {
38467
- const currentScopes = getScopesFromContext(context5);
38370
+ with(context4, fn, thisArg, ...args) {
38371
+ const currentScopes = getScopesFromContext(context4);
38468
38372
  const currentScope = currentScopes?.scope || getCurrentScope();
38469
38373
  const currentIsolationScope = currentScopes?.isolationScope || getIsolationScope();
38470
- const shouldForkIsolationScope = context5.getValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY) === true;
38471
- const scope = context5.getValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY);
38472
- const isolationScope = context5.getValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
38374
+ const shouldForkIsolationScope = context4.getValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY) === true;
38375
+ const scope = context4.getValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY);
38376
+ const isolationScope = context4.getValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
38473
38377
  const newCurrentScope = scope || currentScope.clone();
38474
38378
  const newIsolationScope = isolationScope || (shouldForkIsolationScope ? currentIsolationScope.clone() : currentIsolationScope);
38475
38379
  const scopes = { scope: newCurrentScope, isolationScope: newIsolationScope };
38476
- const ctx1 = setScopesOnContext(context5, scopes);
38380
+ const ctx1 = setScopesOnContext(context4, scopes);
38477
38381
  const ctx2 = ctx1.deleteValue(SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY).deleteValue(SENTRY_FORK_SET_SCOPE_CONTEXT_KEY).deleteValue(SENTRY_FORK_SET_ISOLATION_SCOPE_CONTEXT_KEY);
38478
38382
  setContextOnScope(newCurrentScope, ctx2);
38479
38383
  return super.with(ctx2, fn, thisArg, ...args);
@@ -38550,9 +38454,9 @@ function mapStatus(span) {
38550
38454
  const attributes = spanHasAttributes(span) ? span.attributes : {};
38551
38455
  const status = spanHasStatus(span) ? span.status : undefined;
38552
38456
  if (status) {
38553
- if (status.code === import_api4.SpanStatusCode.OK) {
38457
+ if (status.code === import_api3.SpanStatusCode.OK) {
38554
38458
  return { code: SPAN_STATUS_OK };
38555
- } else if (status.code === import_api4.SpanStatusCode.ERROR) {
38459
+ } else if (status.code === import_api3.SpanStatusCode.ERROR) {
38556
38460
  if (typeof status.message === "undefined") {
38557
38461
  const inferredStatus2 = inferStatusFromAttributes(attributes);
38558
38462
  if (inferredStatus2) {
@@ -38570,7 +38474,7 @@ function mapStatus(span) {
38570
38474
  if (inferredStatus) {
38571
38475
  return inferredStatus;
38572
38476
  }
38573
- if (status?.code === import_api4.SpanStatusCode.UNSET) {
38477
+ if (status?.code === import_api3.SpanStatusCode.UNSET) {
38574
38478
  return { code: SPAN_STATUS_OK };
38575
38479
  } else {
38576
38480
  return { code: SPAN_STATUS_ERROR, message: "unknown_error" };
@@ -38821,8 +38725,8 @@ function removeSentryAttributes(data) {
38821
38725
  function getData(span) {
38822
38726
  const attributes = span.attributes;
38823
38727
  const data = {};
38824
- if (span.kind !== import_api4.SpanKind.INTERNAL) {
38825
- data["otel.kind"] = import_api4.SpanKind[span.kind];
38728
+ if (span.kind !== import_api3.SpanKind.INTERNAL) {
38729
+ data["otel.kind"] = import_api3.SpanKind[span.kind];
38826
38730
  }
38827
38731
  const maybeHttpStatusCodeAttribute = attributes[import_semantic_conventions2.SEMATTRS_HTTP_STATUS_CODE];
38828
38732
  if (maybeHttpStatusCodeAttribute) {
@@ -38841,7 +38745,7 @@ function getData(span) {
38841
38745
  return data;
38842
38746
  }
38843
38747
  function onSpanStart(span, parentContext) {
38844
- const parentSpan = import_api4.trace.getSpan(parentContext);
38748
+ const parentSpan = import_api3.trace.getSpan(parentContext);
38845
38749
  let scopes = getScopesFromContext(parentContext);
38846
38750
  if (parentSpan && !parentSpan.spanContext().isRemote) {
38847
38751
  addChildSpanToSpan(parentSpan, span);
@@ -38849,7 +38753,7 @@ function onSpanStart(span, parentContext) {
38849
38753
  if (parentSpan?.spanContext().isRemote) {
38850
38754
  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_PARENT_IS_REMOTE, true);
38851
38755
  }
38852
- if (parentContext === import_api4.ROOT_CONTEXT) {
38756
+ if (parentContext === import_api3.ROOT_CONTEXT) {
38853
38757
  scopes = {
38854
38758
  scope: getDefaultCurrentScope(),
38855
38759
  isolationScope: getDefaultIsolationScope()
@@ -38893,23 +38797,23 @@ class SentrySampler {
38893
38797
  this._client = client;
38894
38798
  setIsSetup("SentrySampler");
38895
38799
  }
38896
- shouldSample(context5, traceId, spanName, spanKind, spanAttributes, _links) {
38800
+ shouldSample(context4, traceId, spanName, spanKind, spanAttributes, _links) {
38897
38801
  const options = this._client.getOptions();
38898
- const parentSpan = getValidSpan(context5);
38802
+ const parentSpan = getValidSpan(context4);
38899
38803
  const parentContext = parentSpan?.spanContext();
38900
38804
  if (!hasSpansEnabled(options)) {
38901
- return wrapSamplingDecision({ decision: undefined, context: context5, spanAttributes });
38805
+ return wrapSamplingDecision({ decision: undefined, context: context4, spanAttributes });
38902
38806
  }
38903
38807
  const maybeSpanHttpMethod = spanAttributes[import_semantic_conventions2.SEMATTRS_HTTP_METHOD] || spanAttributes[import_semantic_conventions2.ATTR_HTTP_REQUEST_METHOD];
38904
- if (spanKind === import_api4.SpanKind.CLIENT && maybeSpanHttpMethod && (!parentSpan || parentContext?.isRemote)) {
38905
- return wrapSamplingDecision({ decision: undefined, context: context5, spanAttributes });
38808
+ if (spanKind === import_api3.SpanKind.CLIENT && maybeSpanHttpMethod && (!parentSpan || parentContext?.isRemote)) {
38809
+ return wrapSamplingDecision({ decision: undefined, context: context4, spanAttributes });
38906
38810
  }
38907
38811
  const parentSampled = parentSpan ? getParentSampled(parentSpan, traceId, spanName) : undefined;
38908
38812
  const isRootSpan = !parentSpan || parentContext?.isRemote;
38909
38813
  if (!isRootSpan) {
38910
38814
  return wrapSamplingDecision({
38911
38815
  decision: parentSampled ? import_sdk_trace_base.SamplingDecision.RECORD_AND_SAMPLED : import_sdk_trace_base.SamplingDecision.NOT_RECORD,
38912
- context: context5,
38816
+ context: context4,
38913
38817
  spanAttributes
38914
38818
  });
38915
38819
  }
@@ -38933,9 +38837,9 @@ class SentrySampler {
38933
38837
  parentContext
38934
38838
  }, mutableSamplingDecision);
38935
38839
  if (!mutableSamplingDecision.decision) {
38936
- return wrapSamplingDecision({ decision: undefined, context: context5, spanAttributes });
38840
+ return wrapSamplingDecision({ decision: undefined, context: context4, spanAttributes });
38937
38841
  }
38938
- const { isolationScope } = getScopesFromContext(context5) ?? {};
38842
+ const { isolationScope } = getScopesFromContext(context4) ?? {};
38939
38843
  const dscString = parentContext?.traceState ? parentContext.traceState.get(SENTRY_TRACE_STATE_DSC) : undefined;
38940
38844
  const dsc = dscString ? baggageHeaderToDynamicSamplingContext(dscString) : undefined;
38941
38845
  const sampleRand = parseSampleRate(dsc?.sample_rand) ?? Math.random();
@@ -38951,7 +38855,7 @@ class SentrySampler {
38951
38855
  DEBUG_BUILD3 && debug.log(`[Tracing] Not sampling span because HTTP method is '${method}' for ${spanName}`);
38952
38856
  return wrapSamplingDecision({
38953
38857
  decision: import_sdk_trace_base.SamplingDecision.NOT_RECORD,
38954
- context: context5,
38858
+ context: context4,
38955
38859
  spanAttributes,
38956
38860
  sampleRand,
38957
38861
  downstreamTraceSampleRate: 0
@@ -38964,7 +38868,7 @@ class SentrySampler {
38964
38868
  return {
38965
38869
  ...wrapSamplingDecision({
38966
38870
  decision: sampled ? import_sdk_trace_base.SamplingDecision.RECORD_AND_SAMPLED : import_sdk_trace_base.SamplingDecision.NOT_RECORD,
38967
- context: context5,
38871
+ context: context4,
38968
38872
  spanAttributes,
38969
38873
  sampleRand,
38970
38874
  downstreamTraceSampleRate: localSampleRateWasApplied ? sampleRate : undefined
@@ -38980,7 +38884,7 @@ class SentrySampler {
38980
38884
  }
38981
38885
  function getParentSampled(parentSpan, traceId, spanName) {
38982
38886
  const parentContext = parentSpan.spanContext();
38983
- if (import_api4.isSpanContextValid(parentContext) && parentContext.traceId === traceId) {
38887
+ if (import_api3.isSpanContextValid(parentContext) && parentContext.traceId === traceId) {
38984
38888
  if (parentContext.isRemote) {
38985
38889
  const parentSampled2 = getSamplingDecision(parentSpan.spanContext());
38986
38890
  DEBUG_BUILD3 && debug.log(`[Tracing] Inheriting remote parent's sampled decision for ${spanName}: ${parentSampled2}`);
@@ -38994,12 +38898,12 @@ function getParentSampled(parentSpan, traceId, spanName) {
38994
38898
  }
38995
38899
  function wrapSamplingDecision({
38996
38900
  decision,
38997
- context: context5,
38901
+ context: context4,
38998
38902
  spanAttributes,
38999
38903
  sampleRand,
39000
38904
  downstreamTraceSampleRate
39001
38905
  }) {
39002
- let traceState = getBaseTraceState(context5, spanAttributes);
38906
+ let traceState = getBaseTraceState(context4, spanAttributes);
39003
38907
  if (downstreamTraceSampleRate !== undefined) {
39004
38908
  traceState = traceState.set(SENTRY_TRACE_STATE_SAMPLE_RATE, `${downstreamTraceSampleRate}`);
39005
38909
  }
@@ -39014,19 +38918,19 @@ function wrapSamplingDecision({
39014
38918
  }
39015
38919
  return { decision, traceState };
39016
38920
  }
39017
- function getBaseTraceState(context5, spanAttributes) {
39018
- const parentSpan = import_api4.trace.getSpan(context5);
38921
+ function getBaseTraceState(context4, spanAttributes) {
38922
+ const parentSpan = import_api3.trace.getSpan(context4);
39019
38923
  const parentContext = parentSpan?.spanContext();
39020
- let traceState = parentContext?.traceState || new import_core38.TraceState;
38924
+ let traceState = parentContext?.traceState || new import_core37.TraceState;
39021
38925
  const url = spanAttributes[import_semantic_conventions2.SEMATTRS_HTTP_URL] || spanAttributes[import_semantic_conventions2.ATTR_URL_FULL];
39022
38926
  if (url && typeof url === "string") {
39023
38927
  traceState = traceState.set(SENTRY_TRACE_STATE_URL, url);
39024
38928
  }
39025
38929
  return traceState;
39026
38930
  }
39027
- function getValidSpan(context5) {
39028
- const span = import_api4.trace.getSpan(context5);
39029
- return span && import_api4.isSpanContextValid(span.spanContext()) ? span : undefined;
38931
+ function getValidSpan(context4) {
38932
+ const span = import_api3.trace.getSpan(context4);
38933
+ return span && import_api3.isSpanContextValid(span.spanContext()) ? span : undefined;
39030
38934
  }
39031
38935
 
39032
38936
  // ../../node_modules/@sentry/node-core/build/esm/utils/baggage.js
@@ -39141,6 +39045,21 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
39141
39045
  }
39142
39046
  init() {
39143
39047
  let hasRegisteredHandlers = false;
39048
+ const spansEnabled = this.getConfig().spans ?? true;
39049
+ const onHttpServerRequestStart = (_data) => {
39050
+ const data = _data;
39051
+ instrumentServer(data.server, {
39052
+ instrumentation: this.getConfig().instrumentation,
39053
+ ignoreIncomingRequestBody: this.getConfig().ignoreIncomingRequestBody,
39054
+ ignoreSpansForIncomingRequests: this.getConfig().ignoreSpansForIncomingRequests,
39055
+ incomingRequestSpanHook: this.getConfig().incomingRequestSpanHook,
39056
+ maxIncomingRequestBodySize: this.getConfig().maxIncomingRequestBodySize,
39057
+ trackIncomingRequestsAsSessions: this.getConfig().trackIncomingRequestsAsSessions,
39058
+ sessionFlushingDelayMS: this.getConfig().sessionFlushingDelayMS ?? 60000,
39059
+ ignoreStaticAssets: this.getConfig().ignoreStaticAssets,
39060
+ spans: spansEnabled && !this.getConfig().disableIncomingRequestSpans
39061
+ });
39062
+ };
39144
39063
  const onHttpClientResponseFinish = (_data) => {
39145
39064
  const data = _data;
39146
39065
  this._onOutgoingRequestFinish(data.request, data.response);
@@ -39158,14 +39077,16 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
39158
39077
  return moduleExports;
39159
39078
  }
39160
39079
  hasRegisteredHandlers = true;
39161
- subscribe2("http.client.response.finish", onHttpClientResponseFinish);
39162
- subscribe2("http.client.request.error", onHttpClientRequestError);
39080
+ subscribe("http.server.request.start", onHttpServerRequestStart);
39081
+ subscribe("http.client.response.finish", onHttpClientResponseFinish);
39082
+ subscribe("http.client.request.error", onHttpClientRequestError);
39163
39083
  if (this.getConfig().propagateTraceInOutgoingRequests) {
39164
- subscribe2("http.client.request.created", onHttpClientRequestCreated);
39084
+ subscribe("http.client.request.created", onHttpClientRequestCreated);
39165
39085
  }
39166
39086
  return moduleExports;
39167
39087
  };
39168
39088
  const unwrap = () => {
39089
+ unsubscribe("http.server.request.start", onHttpServerRequestStart);
39169
39090
  unsubscribe("http.client.response.finish", onHttpClientResponseFinish);
39170
39091
  unsubscribe("http.client.request.error", onHttpClientRequestError);
39171
39092
  unsubscribe("http.client.request.created", onHttpClientRequestCreated);
@@ -39194,7 +39115,7 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
39194
39115
  addTracePropagationHeadersToOutgoingRequest(request, this._propagationDecisionMap);
39195
39116
  }
39196
39117
  _shouldIgnoreOutgoingRequest(request) {
39197
- if (import_core41.isTracingSuppressed(import_api5.context.active())) {
39118
+ if (import_core40.isTracingSuppressed(import_api4.context.active())) {
39198
39119
  return true;
39199
39120
  }
39200
39121
  const ignoreOutgoingRequests = this.getConfig().ignoreOutgoingRequests;
@@ -39208,51 +39129,53 @@ class SentryHttpInstrumentation extends import_instrumentation2.InstrumentationB
39208
39129
  }
39209
39130
 
39210
39131
  // ../../node_modules/@sentry/node-core/build/esm/integrations/http/index.js
39211
- var INTEGRATION_NAME8 = "Http";
39212
- var instrumentSentryHttp = generateInstrumentOnce(`${INTEGRATION_NAME8}.sentry`, (options) => {
39132
+ var INTEGRATION_NAME6 = "Http";
39133
+ var instrumentSentryHttp = generateInstrumentOnce(`${INTEGRATION_NAME6}.sentry`, (options) => {
39213
39134
  return new SentryHttpInstrumentation(options);
39214
39135
  });
39215
39136
  var httpIntegration = defineIntegration((options = {}) => {
39216
- const serverOptions = {
39217
- sessions: options.trackIncomingRequestsAsSessions,
39218
- sessionFlushingDelayMS: options.sessionFlushingDelayMS,
39219
- ignoreRequestBody: options.ignoreIncomingRequestBody,
39220
- maxRequestBodySize: options.maxIncomingRequestBodySize
39221
- };
39222
- const serverSpansOptions = {
39223
- ignoreIncomingRequests: options.ignoreIncomingRequests,
39224
- ignoreStaticAssets: options.ignoreStaticAssets,
39225
- ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes
39226
- };
39227
- const httpInstrumentationOptions = {
39228
- breadcrumbs: options.breadcrumbs,
39229
- propagateTraceInOutgoingRequests: true,
39230
- ignoreOutgoingRequests: options.ignoreOutgoingRequests
39231
- };
39232
- const server = httpServerIntegration(serverOptions);
39233
- const serverSpans = httpServerSpansIntegration(serverSpansOptions);
39234
- const spans = options.spans ?? false;
39235
- const disableIncomingRequestSpans = options.disableIncomingRequestSpans ?? false;
39236
- const enabledServerSpans = spans && !disableIncomingRequestSpans;
39137
+ const dropSpansForIncomingRequestStatusCodes = options.dropSpansForIncomingRequestStatusCodes ?? [
39138
+ [401, 404],
39139
+ [301, 303],
39140
+ [305, 399]
39141
+ ];
39237
39142
  return {
39238
- name: INTEGRATION_NAME8,
39239
- setup(client) {
39240
- if (enabledServerSpans) {
39241
- serverSpans.setup(client);
39242
- }
39243
- },
39143
+ name: INTEGRATION_NAME6,
39244
39144
  setupOnce() {
39245
- server.setupOnce();
39246
- instrumentSentryHttp(httpInstrumentationOptions);
39145
+ instrumentSentryHttp({
39146
+ ...options,
39147
+ ignoreSpansForIncomingRequests: options.ignoreIncomingRequests,
39148
+ disableIncomingRequestSpans: true,
39149
+ propagateTraceInOutgoingRequests: true
39150
+ });
39247
39151
  },
39248
39152
  processEvent(event) {
39249
- return serverSpans.processEvent(event);
39153
+ if (event.type === "transaction") {
39154
+ const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
39155
+ if (typeof statusCode === "number") {
39156
+ const shouldDrop = shouldFilterStatusCode(statusCode, dropSpansForIncomingRequestStatusCodes);
39157
+ if (shouldDrop) {
39158
+ DEBUG_BUILD2 && debug.log("Dropping transaction due to status code", statusCode);
39159
+ return null;
39160
+ }
39161
+ }
39162
+ }
39163
+ return event;
39250
39164
  }
39251
39165
  };
39252
39166
  });
39167
+ function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
39168
+ return dropForStatusCodes.some((code) => {
39169
+ if (typeof code === "number") {
39170
+ return code === statusCode;
39171
+ }
39172
+ const [min, max] = code;
39173
+ return statusCode >= min && statusCode <= max;
39174
+ });
39175
+ }
39253
39176
  // ../../node_modules/@sentry/node-core/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js
39254
- var import_api6 = __toESM(require_src(), 1);
39255
- var import_core45 = __toESM(require_src3(), 1);
39177
+ var import_api5 = __toESM(require_src(), 1);
39178
+ var import_core44 = __toESM(require_src3(), 1);
39256
39179
  var import_instrumentation3 = __toESM(require_src6(), 1);
39257
39180
  import * as diagch from "diagnostics_channel";
39258
39181
 
@@ -39372,7 +39295,7 @@ class SentryNodeFetchInstrumentation extends import_instrumentation3.Instrumenta
39372
39295
  });
39373
39296
  }
39374
39297
  _shouldIgnoreOutgoingRequest(request) {
39375
- if (import_core45.isTracingSuppressed(import_api6.context.active())) {
39298
+ if (import_core44.isTracingSuppressed(import_api5.context.active())) {
39376
39299
  return true;
39377
39300
  }
39378
39301
  const url = getAbsoluteUrl2(request.origin, request.path);
@@ -39437,8 +39360,8 @@ function getAbsoluteUrl2(origin, path7 = "/") {
39437
39360
  }
39438
39361
 
39439
39362
  // ../../node_modules/@sentry/node-core/build/esm/integrations/node-fetch/index.js
39440
- var INTEGRATION_NAME9 = "NodeFetch";
39441
- var instrumentSentryNodeFetch = generateInstrumentOnce(`${INTEGRATION_NAME9}.sentry`, SentryNodeFetchInstrumentation, (options) => {
39363
+ var INTEGRATION_NAME7 = "NodeFetch";
39364
+ var instrumentSentryNodeFetch = generateInstrumentOnce(`${INTEGRATION_NAME7}.sentry`, SentryNodeFetchInstrumentation, (options) => {
39442
39365
  return options;
39443
39366
  });
39444
39367
  var _nativeNodeFetchIntegration = (options = {}) => {
@@ -39458,7 +39381,7 @@ import { join as join2 } from "node:path";
39458
39381
  import { promisify } from "node:util";
39459
39382
  var readFileAsync = promisify(readFile);
39460
39383
  var readDirAsync = promisify(readdir);
39461
- var INTEGRATION_NAME10 = "Context";
39384
+ var INTEGRATION_NAME8 = "Context";
39462
39385
  var _nodeContextIntegration = (options = {}) => {
39463
39386
  let cachedContext;
39464
39387
  const _options = {
@@ -39507,7 +39430,7 @@ var _nodeContextIntegration = (options = {}) => {
39507
39430
  return contexts;
39508
39431
  }
39509
39432
  return {
39510
- name: INTEGRATION_NAME10,
39433
+ name: INTEGRATION_NAME8,
39511
39434
  processEvent(event) {
39512
39435
  return addContext(event);
39513
39436
  }
@@ -39741,7 +39664,7 @@ import { createInterface } from "node:readline";
39741
39664
  var LRU_FILE_CONTENTS_CACHE = new LRUMap(10);
39742
39665
  var LRU_FILE_CONTENTS_FS_READ_FAILED = new LRUMap(20);
39743
39666
  var DEFAULT_LINES_OF_CONTEXT = 7;
39744
- var INTEGRATION_NAME11 = "ContextLines";
39667
+ var INTEGRATION_NAME9 = "ContextLines";
39745
39668
  var MAX_CONTEXTLINES_COLNO = 1000;
39746
39669
  var MAX_CONTEXTLINES_LINENO = 1e4;
39747
39670
  function emplace(map, key, contents) {
@@ -39978,7 +39901,7 @@ function makeContextRange(line, linecontext) {
39978
39901
  var _contextLinesIntegration = (options = {}) => {
39979
39902
  const contextLines = options.frameContextLines !== undefined ? options.frameContextLines : DEFAULT_LINES_OF_CONTEXT;
39980
39903
  return {
39981
- name: INTEGRATION_NAME11,
39904
+ name: INTEGRATION_NAME9,
39982
39905
  processEvent(event) {
39983
39906
  return addSourceContext(event, contextLines);
39984
39907
  }
@@ -40039,7 +39962,7 @@ function functionNamesMatch(a, b) {
40039
39962
  }
40040
39963
 
40041
39964
  // ../../node_modules/@sentry/node-core/build/esm/integrations/local-variables/local-variables-async.js
40042
- var base64WorkerScript = "LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjE3LjAgKGViNmUyOTQpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";
39965
+ var base64WorkerScript = "LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjE2LjAgKDc0YzUyMTMpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";
40043
39966
  function log2(...args) {
40044
39967
  debug.log("[LocalVariables]", ...args);
40045
39968
  }
@@ -40246,7 +40169,7 @@ class AsyncSession {
40246
40169
  next(vars);
40247
40170
  }
40248
40171
  }
40249
- var INTEGRATION_NAME12 = "LocalVariables";
40172
+ var INTEGRATION_NAME10 = "LocalVariables";
40250
40173
  var _localVariablesSyncIntegration = (options = {}, sessionOverride) => {
40251
40174
  const cachedFrames = new LRUMap(20);
40252
40175
  let rateLimiter;
@@ -40281,7 +40204,7 @@ var _localVariablesSyncIntegration = (options = {}, sessionOverride) => {
40281
40204
  return event;
40282
40205
  }
40283
40206
  return {
40284
- name: INTEGRATION_NAME12,
40207
+ name: INTEGRATION_NAME10,
40285
40208
  async setupOnce() {
40286
40209
  const client = getClient();
40287
40210
  const clientOptions = client?.getOptions();
@@ -40401,11 +40324,11 @@ function supportsEsmLoaderHooks() {
40401
40324
 
40402
40325
  // ../../node_modules/@sentry/node-core/build/esm/integrations/modules.js
40403
40326
  var moduleCache;
40404
- var INTEGRATION_NAME13 = "Modules";
40327
+ var INTEGRATION_NAME11 = "Modules";
40405
40328
  var SERVER_MODULES = typeof __SENTRY_SERVER_MODULES__ === "undefined" ? {} : __SENTRY_SERVER_MODULES__;
40406
40329
  var _modulesIntegration = () => {
40407
40330
  return {
40408
- name: INTEGRATION_NAME13,
40331
+ name: INTEGRATION_NAME11,
40409
40332
  processEvent(event) {
40410
40333
  event.modules = {
40411
40334
  ...event.modules,
@@ -40509,14 +40432,14 @@ function logAndExitProcess(error2) {
40509
40432
  }
40510
40433
 
40511
40434
  // ../../node_modules/@sentry/node-core/build/esm/integrations/onuncaughtexception.js
40512
- var INTEGRATION_NAME14 = "OnUncaughtException";
40435
+ var INTEGRATION_NAME12 = "OnUncaughtException";
40513
40436
  var onUncaughtExceptionIntegration = defineIntegration((options = {}) => {
40514
40437
  const optionsWithDefaults = {
40515
40438
  exitEvenIfOtherHandlersAreRegistered: false,
40516
40439
  ...options
40517
40440
  };
40518
40441
  return {
40519
- name: INTEGRATION_NAME14,
40442
+ name: INTEGRATION_NAME12,
40520
40443
  setup(client) {
40521
40444
  global.process.on("uncaughtException", makeErrorHandler(client, optionsWithDefaults));
40522
40445
  }
@@ -40580,14 +40503,14 @@ function makeErrorHandler(client, options) {
40580
40503
  }
40581
40504
 
40582
40505
  // ../../node_modules/@sentry/node-core/build/esm/integrations/onunhandledrejection.js
40583
- var INTEGRATION_NAME15 = "OnUnhandledRejection";
40506
+ var INTEGRATION_NAME13 = "OnUnhandledRejection";
40584
40507
  var _onUnhandledRejectionIntegration = (options = {}) => {
40585
40508
  const opts = {
40586
40509
  mode: "warn",
40587
40510
  ...options
40588
40511
  };
40589
40512
  return {
40590
- name: INTEGRATION_NAME15,
40513
+ name: INTEGRATION_NAME13,
40591
40514
  setup(client) {
40592
40515
  global.process.on("unhandledRejection", makeUnhandledPromiseHandler(client, opts));
40593
40516
  }
@@ -40635,13 +40558,13 @@ function handleRejection(reason, mode) {
40635
40558
 
40636
40559
  // ../../node_modules/@sentry/node-core/build/esm/integrations/spotlight.js
40637
40560
  import * as http from "node:http";
40638
- var INTEGRATION_NAME16 = "Spotlight";
40561
+ var INTEGRATION_NAME14 = "Spotlight";
40639
40562
  var _spotlightIntegration = (options = {}) => {
40640
40563
  const _options = {
40641
40564
  sidecarUrl: options.sidecarUrl || "http://localhost:8969/stream"
40642
40565
  };
40643
40566
  return {
40644
- name: INTEGRATION_NAME16,
40567
+ name: INTEGRATION_NAME14,
40645
40568
  setup(client) {
40646
40569
  try {
40647
40570
  if (false) {}
@@ -40700,7 +40623,7 @@ function parseSidecarUrl(url) {
40700
40623
 
40701
40624
  // ../../node_modules/@sentry/node-core/build/esm/integrations/systemError.js
40702
40625
  import * as util from "node:util";
40703
- var INTEGRATION_NAME17 = "NodeSystemError";
40626
+ var INTEGRATION_NAME15 = "NodeSystemError";
40704
40627
  function isSystemError(error2) {
40705
40628
  if (!(error2 instanceof Error)) {
40706
40629
  return false;
@@ -40712,7 +40635,7 @@ function isSystemError(error2) {
40712
40635
  }
40713
40636
  var systemErrorIntegration = defineIntegration((options = {}) => {
40714
40637
  return {
40715
- name: INTEGRATION_NAME17,
40638
+ name: INTEGRATION_NAME15,
40716
40639
  processEvent: (event, hint, client) => {
40717
40640
  if (!isSystemError(hint.originalException)) {
40718
40641
  return event;
@@ -40746,10 +40669,10 @@ var systemErrorIntegration = defineIntegration((options = {}) => {
40746
40669
 
40747
40670
  // ../../node_modules/@sentry/node-core/build/esm/integrations/childProcess.js
40748
40671
  import * as diagnosticsChannel from "node:diagnostics_channel";
40749
- var INTEGRATION_NAME18 = "ChildProcess";
40672
+ var INTEGRATION_NAME16 = "ChildProcess";
40750
40673
  var childProcessIntegration = defineIntegration((options = {}) => {
40751
40674
  return {
40752
- name: INTEGRATION_NAME18,
40675
+ name: INTEGRATION_NAME16,
40753
40676
  setup() {
40754
40677
  diagnosticsChannel.channel("child_process").subscribe((event) => {
40755
40678
  if (event && typeof event === "object" && "process" in event) {
@@ -40824,22 +40747,22 @@ function captureWorkerThreadEvents(worker, options) {
40824
40747
  var import_context_async_hooks = __toESM(require_src10(), 1);
40825
40748
  var SentryContextManager = wrapContextManagerClass(import_context_async_hooks.AsyncLocalStorageContextManager);
40826
40749
  // ../../node_modules/@sentry/node-core/build/esm/otel/logger.js
40827
- var import_api7 = __toESM(require_src(), 1);
40750
+ var import_api6 = __toESM(require_src(), 1);
40828
40751
  function setupOpenTelemetryLogger() {
40829
- import_api7.diag.disable();
40830
- import_api7.diag.setLogger({
40752
+ import_api6.diag.disable();
40753
+ import_api6.diag.setLogger({
40831
40754
  error: debug.error,
40832
40755
  warn: debug.warn,
40833
40756
  info: debug.log,
40834
40757
  debug: debug.log,
40835
40758
  verbose: debug.log
40836
- }, import_api7.DiagLogLevel.DEBUG);
40759
+ }, import_api6.DiagLogLevel.DEBUG);
40837
40760
  }
40838
40761
  // ../../node_modules/@sentry/node-core/build/esm/integrations/processSession.js
40839
- var INTEGRATION_NAME19 = "ProcessSession";
40762
+ var INTEGRATION_NAME17 = "ProcessSession";
40840
40763
  var processSessionIntegration = defineIntegration(() => {
40841
40764
  return {
40842
- name: INTEGRATION_NAME19,
40765
+ name: INTEGRATION_NAME17,
40843
40766
  setupOnce() {
40844
40767
  startSession();
40845
40768
  process.on("beforeExit", () => {
@@ -41256,7 +41179,7 @@ function getSentryRelease(fallback) {
41256
41179
  var defaultStackParser = createStackParser(nodeStackLineParser(createGetModuleFromFilename()));
41257
41180
 
41258
41181
  // ../../node_modules/@sentry/node-core/build/esm/sdk/client.js
41259
- var import_api8 = __toESM(require_src(), 1);
41182
+ var import_api7 = __toESM(require_src(), 1);
41260
41183
  var import_instrumentation4 = __toESM(require_src6(), 1);
41261
41184
  import * as os2 from "node:os";
41262
41185
  import { threadId, isMainThread } from "worker_threads";
@@ -41300,7 +41223,7 @@ class NodeClient extends ServerRuntimeClient {
41300
41223
  }
41301
41224
  const name = "@sentry/node";
41302
41225
  const version = SDK_VERSION;
41303
- const tracer = import_api8.trace.getTracer(name, version);
41226
+ const tracer = import_api7.trace.getTracer(name, version);
41304
41227
  this._tracer = tracer;
41305
41228
  return tracer;
41306
41229
  }
@@ -41410,7 +41333,7 @@ function _init(_options = {}, getDefaultIntegrationsImpl) {
41410
41333
  setOpenTelemetryContextAsyncContextStrategy();
41411
41334
  const scope = getCurrentScope();
41412
41335
  scope.update(options.initialScope);
41413
- if (options.spotlight && !options.integrations.some(({ name }) => name === INTEGRATION_NAME16)) {
41336
+ if (options.spotlight && !options.integrations.some(({ name }) => name === INTEGRATION_NAME14)) {
41414
41337
  options.integrations.push(spotlightIntegration({
41415
41338
  sidecarUrl: typeof options.spotlight === "string" ? options.spotlight : undefined
41416
41339
  }));
@@ -41503,19 +41426,22 @@ function updateScopeFromEnvVariables() {
41503
41426
  function addOriginToSpan2(span, origin) {
41504
41427
  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, origin);
41505
41428
  }
41429
+ // ../../node_modules/@sentry/node/build/esm/debug-build.js
41430
+ var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
41431
+
41506
41432
  // ../../node_modules/@sentry/node/build/esm/integrations/http.js
41507
- var INTEGRATION_NAME20 = "Http";
41433
+ var INTEGRATION_NAME18 = "Http";
41508
41434
  var INSTRUMENTATION_NAME2 = "@opentelemetry_sentry-patched/instrumentation-http";
41509
- var instrumentSentryHttp2 = generateInstrumentOnce(`${INTEGRATION_NAME20}.sentry`, (options) => {
41435
+ var instrumentSentryHttp2 = generateInstrumentOnce(`${INTEGRATION_NAME18}.sentry`, (options) => {
41510
41436
  return new SentryHttpInstrumentation(options);
41511
41437
  });
41512
- var instrumentOtelHttp = generateInstrumentOnce(INTEGRATION_NAME20, (config) => {
41438
+ var instrumentOtelHttp = generateInstrumentOnce(INTEGRATION_NAME18, (config) => {
41513
41439
  const instrumentation = new import_instrumentation_http.HttpInstrumentation({
41514
41440
  ...config,
41515
41441
  disableIncomingRequestInstrumentation: true
41516
41442
  });
41517
41443
  try {
41518
- instrumentation["_diag"] = import_api10.diag.createComponentLogger({
41444
+ instrumentation["_diag"] = import_api9.diag.createComponentLogger({
41519
41445
  namespace: INSTRUMENTATION_NAME2
41520
41446
  });
41521
41447
  instrumentation.instrumentationName = INSTRUMENTATION_NAME2;
@@ -41535,49 +41461,40 @@ function _shouldUseOtelHttpInstrumentation(options, clientOptions = {}) {
41535
41461
  return true;
41536
41462
  }
41537
41463
  var httpIntegration2 = defineIntegration((options = {}) => {
41538
- const spans = options.spans ?? true;
41539
- const disableIncomingRequestSpans = options.disableIncomingRequestSpans;
41540
- const serverOptions = {
41541
- sessions: options.trackIncomingRequestsAsSessions,
41542
- sessionFlushingDelayMS: options.sessionFlushingDelayMS,
41543
- ignoreRequestBody: options.ignoreIncomingRequestBody,
41544
- maxRequestBodySize: options.maxIncomingRequestBodySize
41545
- };
41546
- const serverSpansOptions = {
41547
- ignoreIncomingRequests: options.ignoreIncomingRequests,
41548
- ignoreStaticAssets: options.ignoreStaticAssets,
41549
- ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,
41550
- instrumentation: options.instrumentation,
41551
- onSpanCreated: options.incomingRequestSpanHook
41552
- };
41553
- const server = httpServerIntegration(serverOptions);
41554
- const serverSpans = httpServerSpansIntegration(serverSpansOptions);
41555
- const enableServerSpans = spans && !disableIncomingRequestSpans;
41464
+ const dropSpansForIncomingRequestStatusCodes = options.dropSpansForIncomingRequestStatusCodes ?? [
41465
+ [401, 404],
41466
+ [301, 303],
41467
+ [305, 399]
41468
+ ];
41556
41469
  return {
41557
- name: INTEGRATION_NAME20,
41558
- setup(client) {
41559
- const clientOptions = client.getOptions();
41560
- if (enableServerSpans && hasSpansEnabled(clientOptions)) {
41561
- serverSpans.setup(client);
41562
- }
41563
- },
41470
+ name: INTEGRATION_NAME18,
41564
41471
  setupOnce() {
41565
41472
  const clientOptions = getClient()?.getOptions() || {};
41566
41473
  const useOtelHttpInstrumentation = _shouldUseOtelHttpInstrumentation(options, clientOptions);
41567
- server.setupOnce();
41568
- const sentryHttpInstrumentationOptions = {
41569
- breadcrumbs: options.breadcrumbs,
41570
- propagateTraceInOutgoingRequests: !useOtelHttpInstrumentation,
41571
- ignoreOutgoingRequests: options.ignoreOutgoingRequests
41572
- };
41573
- instrumentSentryHttp2(sentryHttpInstrumentationOptions);
41474
+ const disableIncomingRequestSpans = options.disableIncomingRequestSpans ?? !hasSpansEnabled(clientOptions);
41475
+ instrumentSentryHttp2({
41476
+ ...options,
41477
+ disableIncomingRequestSpans,
41478
+ ignoreSpansForIncomingRequests: options.ignoreIncomingRequests,
41479
+ propagateTraceInOutgoingRequests: !useOtelHttpInstrumentation
41480
+ });
41574
41481
  if (useOtelHttpInstrumentation) {
41575
41482
  const instrumentationConfig = getConfigWithDefaults(options);
41576
41483
  instrumentOtelHttp(instrumentationConfig);
41577
41484
  }
41578
41485
  },
41579
41486
  processEvent(event) {
41580
- return serverSpans.processEvent(event);
41487
+ if (event.type === "transaction") {
41488
+ const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
41489
+ if (typeof statusCode === "number") {
41490
+ const shouldDrop = shouldFilterStatusCode2(statusCode, dropSpansForIncomingRequestStatusCodes);
41491
+ if (shouldDrop) {
41492
+ DEBUG_BUILD4 && debug.log("Dropping transaction due to status code", statusCode);
41493
+ return null;
41494
+ }
41495
+ }
41496
+ }
41497
+ return event;
41581
41498
  }
41582
41499
  };
41583
41500
  });
@@ -41608,14 +41525,23 @@ function getConfigWithDefaults(options = {}) {
41608
41525
  };
41609
41526
  return instrumentationConfig;
41610
41527
  }
41528
+ function shouldFilterStatusCode2(statusCode, dropForStatusCodes) {
41529
+ return dropForStatusCodes.some((code) => {
41530
+ if (typeof code === "number") {
41531
+ return code === statusCode;
41532
+ }
41533
+ const [min, max] = code;
41534
+ return statusCode >= min && statusCode <= max;
41535
+ });
41536
+ }
41611
41537
 
41612
41538
  // ../../node_modules/@sentry/node/build/esm/integrations/node-fetch.js
41613
41539
  var import_instrumentation_undici = __toESM(require_src11(), 1);
41614
- var INTEGRATION_NAME21 = "NodeFetch";
41615
- var instrumentOtelNodeFetch = generateInstrumentOnce(INTEGRATION_NAME21, import_instrumentation_undici.UndiciInstrumentation, (options) => {
41540
+ var INTEGRATION_NAME19 = "NodeFetch";
41541
+ var instrumentOtelNodeFetch = generateInstrumentOnce(INTEGRATION_NAME19, import_instrumentation_undici.UndiciInstrumentation, (options) => {
41616
41542
  return getConfigWithDefaults2(options);
41617
41543
  });
41618
- var instrumentSentryNodeFetch2 = generateInstrumentOnce(`${INTEGRATION_NAME21}.sentry`, SentryNodeFetchInstrumentation, (options) => {
41544
+ var instrumentSentryNodeFetch2 = generateInstrumentOnce(`${INTEGRATION_NAME19}.sentry`, SentryNodeFetchInstrumentation, (options) => {
41619
41545
  return options;
41620
41546
  });
41621
41547
  var _nativeNodeFetchIntegration2 = (options = {}) => {
@@ -41664,12 +41590,7 @@ function getConfigWithDefaults2(options = {}) {
41664
41590
 
41665
41591
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/express.js
41666
41592
  var import_instrumentation_express = __toESM(require_src12(), 1);
41667
-
41668
- // ../../node_modules/@sentry/node/build/esm/debug-build.js
41669
- var DEBUG_BUILD4 = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
41670
-
41671
- // ../../node_modules/@sentry/node/build/esm/integrations/tracing/express.js
41672
- var INTEGRATION_NAME22 = "Express";
41593
+ var INTEGRATION_NAME20 = "Express";
41673
41594
  function requestHook(span) {
41674
41595
  addOriginToSpan2(span, "auto.http.otel.express");
41675
41596
  const attributes = spanToJSON(span).data;
@@ -41694,13 +41615,13 @@ function spanNameHook(info, defaultName) {
41694
41615
  }
41695
41616
  return defaultName;
41696
41617
  }
41697
- var instrumentExpress = generateInstrumentOnce(INTEGRATION_NAME22, () => new import_instrumentation_express.ExpressInstrumentation({
41618
+ var instrumentExpress = generateInstrumentOnce(INTEGRATION_NAME20, () => new import_instrumentation_express.ExpressInstrumentation({
41698
41619
  requestHook: (span) => requestHook(span),
41699
41620
  spanNameHook: (info, defaultName) => spanNameHook(info, defaultName)
41700
41621
  }));
41701
41622
  var _expressIntegration = () => {
41702
41623
  return {
41703
- name: INTEGRATION_NAME22,
41624
+ name: INTEGRATION_NAME20,
41704
41625
  setupOnce() {
41705
41626
  instrumentExpress();
41706
41627
  }
@@ -41712,8 +41633,8 @@ var expressIntegration = defineIntegration(_expressIntegration);
41712
41633
  import * as dc from "node:diagnostics_channel";
41713
41634
 
41714
41635
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/fastify-otel/index.js
41715
- var import_api11 = __toESM(require_src(), 1);
41716
- var import_core73 = __toESM(require_src3(), 1);
41636
+ var import_api10 = __toESM(require_src(), 1);
41637
+ var import_core72 = __toESM(require_src3(), 1);
41717
41638
  var import_instrumentation5 = __toESM(require_src6(), 1);
41718
41639
  var import_semantic_conventions3 = __toESM(require_src2(), 1);
41719
41640
  import dc__default from "node:diagnostics_channel";
@@ -42969,7 +42890,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
42969
42890
  super(PACKAGE_NAME, PACKAGE_VERSION, config);
42970
42891
  this.servername = config?.servername ?? process.env.OTEL_SERVICE_NAME ?? "fastify";
42971
42892
  this[kIgnorePaths] = null;
42972
- this._logger = import_api11.diag.createComponentLogger({ namespace: PACKAGE_NAME });
42893
+ this._logger = import_api10.diag.createComponentLogger({ namespace: PACKAGE_NAME });
42973
42894
  if (config?.ignorePaths != null || process.env.OTEL_FASTIFY_IGNORE_PATHS != null) {
42974
42895
  const ignorePaths = config?.ignorePaths ?? process.env.OTEL_FASTIFY_IGNORE_PATHS;
42975
42896
  if ((typeof ignorePaths !== "string" || ignorePaths.length === 0) && typeof ignorePaths !== "function") {
@@ -43026,10 +42947,10 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43026
42947
  tracer: instrumentation.tracer,
43027
42948
  context: ctx,
43028
42949
  inject: (carrier, setter) => {
43029
- return import_api11.propagation.inject(ctx, carrier, setter);
42950
+ return import_api10.propagation.inject(ctx, carrier, setter);
43030
42951
  },
43031
42952
  extract: (carrier, getter) => {
43032
- return import_api11.propagation.extract(ctx, carrier, getter);
42953
+ return import_api10.propagation.extract(ctx, carrier, getter);
43033
42954
  }
43034
42955
  };
43035
42956
  });
@@ -43094,12 +43015,12 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43094
43015
  this[kInstrumentation]._logger.debug(`Ignoring request ${request2.method} ${request2.url} because it matches the ignore path`);
43095
43016
  return hookDone();
43096
43017
  }
43097
- let ctx = import_api11.context.active();
43098
- if (import_api11.trace.getSpan(ctx) == null) {
43099
- ctx = import_api11.propagation.extract(ctx, request2.headers);
43018
+ let ctx = import_api10.context.active();
43019
+ if (import_api10.trace.getSpan(ctx) == null) {
43020
+ ctx = import_api10.propagation.extract(ctx, request2.headers);
43100
43021
  }
43101
- const rpcMetadata = import_core73.getRPCMetadata(ctx);
43102
- if (request2.routeOptions.url != null && rpcMetadata?.type === import_core73.RPCType.HTTP) {
43022
+ const rpcMetadata = import_core72.getRPCMetadata(ctx);
43023
+ if (request2.routeOptions.url != null && rpcMetadata?.type === import_core72.RPCType.HTTP) {
43103
43024
  rpcMetadata.route = request2.routeOptions.url;
43104
43025
  }
43105
43026
  const span = this[kInstrumentation].tracer.startSpan("request", {
@@ -43110,9 +43031,9 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43110
43031
  [import_semantic_conventions3.ATTR_HTTP_REQUEST_METHOD]: request2.method
43111
43032
  }
43112
43033
  }, ctx);
43113
- request2[kRequestContext] = import_api11.trace.setSpan(ctx, span);
43034
+ request2[kRequestContext] = import_api10.trace.setSpan(ctx, span);
43114
43035
  request2[kRequestSpan] = span;
43115
- import_api11.context.with(request2[kRequestContext], () => {
43036
+ import_api10.context.with(request2[kRequestContext], () => {
43116
43037
  hookDone();
43117
43038
  });
43118
43039
  });
@@ -43120,7 +43041,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43120
43041
  const span = request2[kRequestSpan];
43121
43042
  if (span != null) {
43122
43043
  span.setStatus({
43123
- code: import_api11.SpanStatusCode.OK,
43044
+ code: import_api10.SpanStatusCode.OK,
43124
43045
  message: "OK"
43125
43046
  });
43126
43047
  span.setAttributes({
@@ -43139,7 +43060,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43139
43060
  if (span != null) {
43140
43061
  if (reply.statusCode < 500) {
43141
43062
  span.setStatus({
43142
- code: import_api11.SpanStatusCode.OK,
43063
+ code: import_api10.SpanStatusCode.OK,
43143
43064
  message: "OK"
43144
43065
  });
43145
43066
  }
@@ -43155,7 +43076,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43155
43076
  const span = request2[kRequestSpan];
43156
43077
  if (span != null) {
43157
43078
  span.setStatus({
43158
- code: import_api11.SpanStatusCode.ERROR,
43079
+ code: import_api10.SpanStatusCode.ERROR,
43159
43080
  message: error2.message
43160
43081
  });
43161
43082
  span.recordException(error2);
@@ -43218,11 +43139,11 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43218
43139
  if (instrumentation2.isEnabled() === false) {
43219
43140
  return handler.call(this, ...args);
43220
43141
  }
43221
- const ctx = request2[kRequestContext] ?? import_api11.context.active();
43142
+ const ctx = request2[kRequestContext] ?? import_api10.context.active();
43222
43143
  const span = instrumentation2.tracer.startSpan(`handler - ${handler.name?.length > 0 ? handler.name : this.pluginName ?? ANONYMOUS_FUNCTION_NAME}`, {
43223
43144
  attributes: spanAttributes
43224
43145
  }, ctx);
43225
- return import_api11.context.with(import_api11.trace.setSpan(ctx, span), function() {
43146
+ return import_api10.context.with(import_api10.trace.setSpan(ctx, span), function() {
43226
43147
  try {
43227
43148
  const res = handler.call(this, ...args);
43228
43149
  if (typeof res?.then === "function") {
@@ -43231,7 +43152,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43231
43152
  return result;
43232
43153
  }, (error2) => {
43233
43154
  span.setStatus({
43234
- code: import_api11.SpanStatusCode.ERROR,
43155
+ code: import_api10.SpanStatusCode.ERROR,
43235
43156
  message: error2.message
43236
43157
  });
43237
43158
  span.recordException(error2);
@@ -43243,7 +43164,7 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43243
43164
  return res;
43244
43165
  } catch (error2) {
43245
43166
  span.setStatus({
43246
- code: import_api11.SpanStatusCode.ERROR,
43167
+ code: import_api10.SpanStatusCode.ERROR,
43247
43168
  message: error2.message
43248
43169
  });
43249
43170
  span.recordException(error2);
@@ -43258,8 +43179,8 @@ class FastifyOtelInstrumentation extends import_instrumentation5.Instrumentation
43258
43179
  }
43259
43180
 
43260
43181
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/v3/instrumentation.js
43261
- var import_api13 = __toESM(require_src(), 1);
43262
- var import_core74 = __toESM(require_src3(), 1);
43182
+ var import_api12 = __toESM(require_src(), 1);
43183
+ var import_core73 = __toESM(require_src3(), 1);
43263
43184
  var import_instrumentation6 = __toESM(require_src6(), 1);
43264
43185
  var import_semantic_conventions4 = __toESM(require_src2(), 1);
43265
43186
 
@@ -43291,7 +43212,7 @@ var FastifyNames;
43291
43212
  })(FastifyNames || (FastifyNames = {}));
43292
43213
 
43293
43214
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/v3/utils.js
43294
- var import_api12 = __toESM(require_src(), 1);
43215
+ var import_api11 = __toESM(require_src(), 1);
43295
43216
 
43296
43217
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/v3/constants.js
43297
43218
  var spanRequestSymbol = Symbol("opentelemetry.instrumentation.fastify.request_active_span");
@@ -43316,7 +43237,7 @@ function endSpan(reply, err) {
43316
43237
  spans.forEach((span) => {
43317
43238
  if (err) {
43318
43239
  span.setStatus({
43319
- code: import_api12.SpanStatusCode.ERROR,
43240
+ code: import_api11.SpanStatusCode.ERROR,
43320
43241
  message: err.message
43321
43242
  });
43322
43243
  span.recordException(err);
@@ -43384,9 +43305,9 @@ class FastifyInstrumentationV3 extends import_instrumentation6.InstrumentationBa
43384
43305
  }
43385
43306
  instrumentation._wrap(reply, "send", instrumentation._patchSend());
43386
43307
  const anyRequest = request2;
43387
- const rpcMetadata = import_core74.getRPCMetadata(import_api13.context.active());
43308
+ const rpcMetadata = import_core73.getRPCMetadata(import_api12.context.active());
43388
43309
  const routeName = anyRequest.routeOptions ? anyRequest.routeOptions.url : request2.routerPath;
43389
- if (routeName && rpcMetadata?.type === import_core74.RPCType.HTTP) {
43310
+ if (routeName && rpcMetadata?.type === import_core73.RPCType.HTTP) {
43390
43311
  rpcMetadata.route = routeName;
43391
43312
  }
43392
43313
  const method = request2.method || "GET";
@@ -43416,13 +43337,13 @@ class FastifyInstrumentationV3 extends import_instrumentation6.InstrumentationBa
43416
43337
  origDone.apply(this, doneArgs);
43417
43338
  };
43418
43339
  }
43419
- return import_api13.context.with(import_api13.trace.setSpan(import_api13.context.active(), span), () => {
43340
+ return import_api12.context.with(import_api12.trace.setSpan(import_api12.context.active(), span), () => {
43420
43341
  return safeExecuteInTheMiddleMaybePromise(() => {
43421
43342
  return original.apply(this, args);
43422
43343
  }, (err) => {
43423
43344
  if (err instanceof Error) {
43424
43345
  span.setStatus({
43425
- code: import_api13.SpanStatusCode.ERROR,
43346
+ code: import_api12.SpanStatusCode.ERROR,
43426
43347
  message: err.message
43427
43348
  });
43428
43349
  span.recordException(err);
@@ -43519,7 +43440,7 @@ class FastifyInstrumentationV3 extends import_instrumentation6.InstrumentationBa
43519
43440
  }
43520
43441
  }, true);
43521
43442
  }
43522
- return import_api13.context.with(import_api13.trace.setSpan(import_api13.context.active(), span), () => {
43443
+ return import_api12.context.with(import_api12.trace.setSpan(import_api12.context.active(), span), () => {
43523
43444
  done();
43524
43445
  });
43525
43446
  };
@@ -43551,14 +43472,14 @@ function addFastifyV3SpanAttributes(span) {
43551
43472
  }
43552
43473
 
43553
43474
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/fastify/index.js
43554
- var INTEGRATION_NAME23 = "Fastify";
43555
- var instrumentFastifyV3 = generateInstrumentOnce(`${INTEGRATION_NAME23}.v3`, () => new FastifyInstrumentationV3);
43475
+ var INTEGRATION_NAME21 = "Fastify";
43476
+ var instrumentFastifyV3 = generateInstrumentOnce(`${INTEGRATION_NAME21}.v3`, () => new FastifyInstrumentationV3);
43556
43477
  function getFastifyIntegration() {
43557
43478
  const client = getClient();
43558
43479
  if (!client) {
43559
43480
  return;
43560
43481
  } else {
43561
- return client.getIntegrationByName(INTEGRATION_NAME23);
43482
+ return client.getIntegrationByName(INTEGRATION_NAME21);
43562
43483
  }
43563
43484
  }
43564
43485
  function handleFastifyError(error2, request2, reply, handlerOrigin) {
@@ -43574,7 +43495,7 @@ function handleFastifyError(error2, request2, reply, handlerOrigin) {
43574
43495
  captureException(error2, { mechanism: { handled: false, type: "auto.function.fastify" } });
43575
43496
  }
43576
43497
  }
43577
- var instrumentFastify = generateInstrumentOnce(`${INTEGRATION_NAME23}.v5`, () => {
43498
+ var instrumentFastify = generateInstrumentOnce(`${INTEGRATION_NAME21}.v5`, () => {
43578
43499
  const fastifyOtelInstrumentationInstance = new FastifyOtelInstrumentation;
43579
43500
  const plugin = fastifyOtelInstrumentationInstance.plugin();
43580
43501
  dc.subscribe("fastify.initialization", (message) => {
@@ -43599,7 +43520,7 @@ var instrumentFastify = generateInstrumentOnce(`${INTEGRATION_NAME23}.v5`, () =>
43599
43520
  var _fastifyIntegration = ({ shouldHandleError }) => {
43600
43521
  let _shouldHandleError;
43601
43522
  return {
43602
- name: INTEGRATION_NAME23,
43523
+ name: INTEGRATION_NAME21,
43603
43524
  setupOnce() {
43604
43525
  _shouldHandleError = shouldHandleError || defaultShouldHandleError;
43605
43526
  instrumentFastifyV3();
@@ -43663,10 +43584,10 @@ function instrumentOnRequest(fastify) {
43663
43584
  }
43664
43585
 
43665
43586
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/graphql.js
43666
- var import_api14 = __toESM(require_src(), 1);
43587
+ var import_api13 = __toESM(require_src(), 1);
43667
43588
  var import_instrumentation_graphql = __toESM(require_src13(), 1);
43668
- var INTEGRATION_NAME24 = "Graphql";
43669
- var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME24, import_instrumentation_graphql.GraphQLInstrumentation, (_options) => {
43589
+ var INTEGRATION_NAME22 = "Graphql";
43590
+ var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME22, import_instrumentation_graphql.GraphQLInstrumentation, (_options) => {
43670
43591
  const options = getOptionsWithDefaults(_options);
43671
43592
  return {
43672
43593
  ...options,
@@ -43674,7 +43595,7 @@ var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME24, import_instru
43674
43595
  addOriginToSpan2(span, "auto.graphql.otel.graphql");
43675
43596
  const resultWithMaybeError = result;
43676
43597
  if (resultWithMaybeError.errors?.length && !spanToJSON(span).status) {
43677
- span.setStatus({ code: import_api14.SpanStatusCode.ERROR });
43598
+ span.setStatus({ code: import_api13.SpanStatusCode.ERROR });
43678
43599
  }
43679
43600
  const attributes = spanToJSON(span).data;
43680
43601
  const operationType = attributes["graphql.operation.type"];
@@ -43702,7 +43623,7 @@ var instrumentGraphql = generateInstrumentOnce(INTEGRATION_NAME24, import_instru
43702
43623
  });
43703
43624
  var _graphqlIntegration = (options = {}) => {
43704
43625
  return {
43705
- name: INTEGRATION_NAME24,
43626
+ name: INTEGRATION_NAME22,
43706
43627
  setupOnce() {
43707
43628
  instrumentGraphql(getOptionsWithDefaults(options));
43708
43629
  }
@@ -43731,8 +43652,8 @@ function getGraphqlOperationNamesFromAttribute2(attr) {
43731
43652
 
43732
43653
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/kafka.js
43733
43654
  var import_instrumentation_kafkajs = __toESM(require_src14(), 1);
43734
- var INTEGRATION_NAME25 = "Kafka";
43735
- var instrumentKafka = generateInstrumentOnce(INTEGRATION_NAME25, () => new import_instrumentation_kafkajs.KafkaJsInstrumentation({
43655
+ var INTEGRATION_NAME23 = "Kafka";
43656
+ var instrumentKafka = generateInstrumentOnce(INTEGRATION_NAME23, () => new import_instrumentation_kafkajs.KafkaJsInstrumentation({
43736
43657
  consumerHook(span) {
43737
43658
  addOriginToSpan2(span, "auto.kafkajs.otel.consumer");
43738
43659
  },
@@ -43742,7 +43663,7 @@ var instrumentKafka = generateInstrumentOnce(INTEGRATION_NAME25, () => new impor
43742
43663
  }));
43743
43664
  var _kafkaIntegration = () => {
43744
43665
  return {
43745
- name: INTEGRATION_NAME25,
43666
+ name: INTEGRATION_NAME23,
43746
43667
  setupOnce() {
43747
43668
  instrumentKafka();
43748
43669
  }
@@ -43752,11 +43673,11 @@ var kafkaIntegration = defineIntegration(_kafkaIntegration);
43752
43673
 
43753
43674
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/lrumemoizer.js
43754
43675
  var import_instrumentation_lru_memoizer = __toESM(require_src15(), 1);
43755
- var INTEGRATION_NAME26 = "LruMemoizer";
43756
- var instrumentLruMemoizer = generateInstrumentOnce(INTEGRATION_NAME26, () => new import_instrumentation_lru_memoizer.LruMemoizerInstrumentation);
43676
+ var INTEGRATION_NAME24 = "LruMemoizer";
43677
+ var instrumentLruMemoizer = generateInstrumentOnce(INTEGRATION_NAME24, () => new import_instrumentation_lru_memoizer.LruMemoizerInstrumentation);
43757
43678
  var _lruMemoizerIntegration = () => {
43758
43679
  return {
43759
- name: INTEGRATION_NAME26,
43680
+ name: INTEGRATION_NAME24,
43760
43681
  setupOnce() {
43761
43682
  instrumentLruMemoizer();
43762
43683
  }
@@ -43766,8 +43687,8 @@ var lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration);
43766
43687
 
43767
43688
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/mongo.js
43768
43689
  var import_instrumentation_mongodb = __toESM(require_src16(), 1);
43769
- var INTEGRATION_NAME27 = "Mongo";
43770
- var instrumentMongo = generateInstrumentOnce(INTEGRATION_NAME27, () => new import_instrumentation_mongodb.MongoDBInstrumentation({
43690
+ var INTEGRATION_NAME25 = "Mongo";
43691
+ var instrumentMongo = generateInstrumentOnce(INTEGRATION_NAME25, () => new import_instrumentation_mongodb.MongoDBInstrumentation({
43771
43692
  dbStatementSerializer: _defaultDbStatementSerializer,
43772
43693
  responseHook(span) {
43773
43694
  addOriginToSpan2(span, "auto.db.otel.mongo");
@@ -43807,7 +43728,7 @@ function isCommandEntry(value) {
43807
43728
  }
43808
43729
  var _mongoIntegration = () => {
43809
43730
  return {
43810
- name: INTEGRATION_NAME27,
43731
+ name: INTEGRATION_NAME25,
43811
43732
  setupOnce() {
43812
43733
  instrumentMongo();
43813
43734
  }
@@ -43817,15 +43738,15 @@ var mongoIntegration = defineIntegration(_mongoIntegration);
43817
43738
 
43818
43739
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/mongoose.js
43819
43740
  var import_instrumentation_mongoose = __toESM(require_src17(), 1);
43820
- var INTEGRATION_NAME28 = "Mongoose";
43821
- var instrumentMongoose = generateInstrumentOnce(INTEGRATION_NAME28, () => new import_instrumentation_mongoose.MongooseInstrumentation({
43741
+ var INTEGRATION_NAME26 = "Mongoose";
43742
+ var instrumentMongoose = generateInstrumentOnce(INTEGRATION_NAME26, () => new import_instrumentation_mongoose.MongooseInstrumentation({
43822
43743
  responseHook(span) {
43823
43744
  addOriginToSpan2(span, "auto.db.otel.mongoose");
43824
43745
  }
43825
43746
  }));
43826
43747
  var _mongooseIntegration = () => {
43827
43748
  return {
43828
- name: INTEGRATION_NAME28,
43749
+ name: INTEGRATION_NAME26,
43829
43750
  setupOnce() {
43830
43751
  instrumentMongoose();
43831
43752
  }
@@ -43835,11 +43756,11 @@ var mongooseIntegration = defineIntegration(_mongooseIntegration);
43835
43756
 
43836
43757
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/mysql.js
43837
43758
  var import_instrumentation_mysql = __toESM(require_src18(), 1);
43838
- var INTEGRATION_NAME29 = "Mysql";
43839
- var instrumentMysql = generateInstrumentOnce(INTEGRATION_NAME29, () => new import_instrumentation_mysql.MySQLInstrumentation({}));
43759
+ var INTEGRATION_NAME27 = "Mysql";
43760
+ var instrumentMysql = generateInstrumentOnce(INTEGRATION_NAME27, () => new import_instrumentation_mysql.MySQLInstrumentation({}));
43840
43761
  var _mysqlIntegration = () => {
43841
43762
  return {
43842
- name: INTEGRATION_NAME29,
43763
+ name: INTEGRATION_NAME27,
43843
43764
  setupOnce() {
43844
43765
  instrumentMysql();
43845
43766
  }
@@ -43849,15 +43770,15 @@ var mysqlIntegration = defineIntegration(_mysqlIntegration);
43849
43770
 
43850
43771
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/mysql2.js
43851
43772
  var import_instrumentation_mysql2 = __toESM(require_src20(), 1);
43852
- var INTEGRATION_NAME30 = "Mysql2";
43853
- var instrumentMysql2 = generateInstrumentOnce(INTEGRATION_NAME30, () => new import_instrumentation_mysql2.MySQL2Instrumentation({
43773
+ var INTEGRATION_NAME28 = "Mysql2";
43774
+ var instrumentMysql2 = generateInstrumentOnce(INTEGRATION_NAME28, () => new import_instrumentation_mysql2.MySQL2Instrumentation({
43854
43775
  responseHook(span) {
43855
43776
  addOriginToSpan2(span, "auto.db.otel.mysql2");
43856
43777
  }
43857
43778
  }));
43858
43779
  var _mysql2Integration = () => {
43859
43780
  return {
43860
- name: INTEGRATION_NAME30,
43781
+ name: INTEGRATION_NAME28,
43861
43782
  setupOnce() {
43862
43783
  instrumentMysql2();
43863
43784
  }
@@ -43959,7 +43880,7 @@ function flatten(input) {
43959
43880
  }
43960
43881
 
43961
43882
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/redis.js
43962
- var INTEGRATION_NAME31 = "Redis";
43883
+ var INTEGRATION_NAME29 = "Redis";
43963
43884
  var _redisOptions = {};
43964
43885
  var cacheResponseHook = (span, redisCommand, cmdArgs, response) => {
43965
43886
  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.db.otel.redis");
@@ -43987,12 +43908,12 @@ var cacheResponseHook = (span, redisCommand, cmdArgs, response) => {
43987
43908
  const spanDescription = safeKey.join(", ");
43988
43909
  span.updateName(truncate(spanDescription, 1024));
43989
43910
  };
43990
- var instrumentIORedis = generateInstrumentOnce(`${INTEGRATION_NAME31}.IORedis`, () => {
43911
+ var instrumentIORedis = generateInstrumentOnce(`${INTEGRATION_NAME29}.IORedis`, () => {
43991
43912
  return new import_instrumentation_ioredis.IORedisInstrumentation({
43992
43913
  responseHook: cacheResponseHook
43993
43914
  });
43994
43915
  });
43995
- var instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME31}.Redis`, () => {
43916
+ var instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME29}.Redis`, () => {
43996
43917
  return new import_instrumentation_redis.RedisInstrumentation({
43997
43918
  responseHook: cacheResponseHook
43998
43919
  });
@@ -44000,10 +43921,10 @@ var instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME31}.Redis`
44000
43921
  var instrumentRedis = Object.assign(() => {
44001
43922
  instrumentIORedis();
44002
43923
  instrumentRedisModule();
44003
- }, { id: INTEGRATION_NAME31 });
43924
+ }, { id: INTEGRATION_NAME29 });
44004
43925
  var _redisIntegration = (options = {}) => {
44005
43926
  return {
44006
- name: INTEGRATION_NAME31,
43927
+ name: INTEGRATION_NAME29,
44007
43928
  setupOnce() {
44008
43929
  _redisOptions = options;
44009
43930
  instrumentRedis();
@@ -44014,8 +43935,8 @@ var redisIntegration = defineIntegration(_redisIntegration);
44014
43935
 
44015
43936
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/postgres.js
44016
43937
  var import_instrumentation_pg = __toESM(require_src24(), 1);
44017
- var INTEGRATION_NAME32 = "Postgres";
44018
- var instrumentPostgres = generateInstrumentOnce(INTEGRATION_NAME32, () => new import_instrumentation_pg.PgInstrumentation({
43938
+ var INTEGRATION_NAME30 = "Postgres";
43939
+ var instrumentPostgres = generateInstrumentOnce(INTEGRATION_NAME30, () => new import_instrumentation_pg.PgInstrumentation({
44019
43940
  requireParentSpan: true,
44020
43941
  requestHook(span) {
44021
43942
  addOriginToSpan2(span, "auto.db.otel.postgres");
@@ -44023,7 +43944,7 @@ var instrumentPostgres = generateInstrumentOnce(INTEGRATION_NAME32, () => new im
44023
43944
  }));
44024
43945
  var _postgresIntegration = () => {
44025
43946
  return {
44026
- name: INTEGRATION_NAME32,
43947
+ name: INTEGRATION_NAME30,
44027
43948
  setupOnce() {
44028
43949
  instrumentPostgres();
44029
43950
  }
@@ -44032,12 +43953,12 @@ var _postgresIntegration = () => {
44032
43953
  var postgresIntegration = defineIntegration(_postgresIntegration);
44033
43954
 
44034
43955
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/postgresjs.js
44035
- var import_api15 = __toESM(require_src(), 1);
43956
+ var import_api14 = __toESM(require_src(), 1);
44036
43957
  var import_instrumentation8 = __toESM(require_src6(), 1);
44037
43958
  var import_semantic_conventions5 = __toESM(require_src2(), 1);
44038
- var INTEGRATION_NAME33 = "PostgresJs";
43959
+ var INTEGRATION_NAME31 = "PostgresJs";
44039
43960
  var SUPPORTED_VERSIONS2 = [">=3.0.0 <4"];
44040
- var instrumentPostgresJs = generateInstrumentOnce(INTEGRATION_NAME33, (options) => new PostgresJsInstrumentation({
43961
+ var instrumentPostgresJs = generateInstrumentOnce(INTEGRATION_NAME31, (options) => new PostgresJsInstrumentation({
44041
43962
  requireParentSpan: options?.requireParentSpan ?? true,
44042
43963
  requestHook: options?.requestHook
44043
43964
  }));
@@ -44056,7 +43977,7 @@ class PostgresJsInstrumentation extends import_instrumentation8.InstrumentationB
44056
43977
  }
44057
43978
  _shouldCreateSpans() {
44058
43979
  const config = this.getConfig();
44059
- const hasParentSpan = import_api15.trace.getSpan(import_api15.context.active()) !== undefined;
43980
+ const hasParentSpan = import_api14.trace.getSpan(import_api14.context.active()) !== undefined;
44060
43981
  return hasParentSpan || !config.requireParentSpan;
44061
43982
  }
44062
43983
  _patchReject(rejectTarget, span) {
@@ -44105,7 +44026,7 @@ class PostgresJsInstrumentation extends import_instrumentation8.InstrumentationB
44105
44026
  if (requestHook2) {
44106
44027
  import_instrumentation8.safeExecuteInTheMiddle(() => requestHook2(span, sanitizedSqlQuery, postgresConnectionContext), (error2) => {
44107
44028
  if (error2) {
44108
- debug.error(`Error in requestHook for ${INTEGRATION_NAME33} integration:`, error2);
44029
+ debug.error(`Error in requestHook for ${INTEGRATION_NAME31} integration:`, error2);
44109
44030
  }
44110
44031
  });
44111
44032
  }
@@ -44158,7 +44079,7 @@ class PostgresJsInstrumentation extends import_instrumentation8.InstrumentationB
44158
44079
  }
44159
44080
  var _postgresJsIntegration = () => {
44160
44081
  return {
44161
- name: INTEGRATION_NAME33,
44082
+ name: INTEGRATION_NAME31,
44162
44083
  setupOnce() {
44163
44084
  instrumentPostgresJs();
44164
44085
  }
@@ -44167,21 +44088,21 @@ var _postgresJsIntegration = () => {
44167
44088
  var postgresJsIntegration = defineIntegration(_postgresJsIntegration);
44168
44089
 
44169
44090
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/prisma.js
44170
- var import_api18 = __toESM(require_src(), 1);
44091
+ var import_api17 = __toESM(require_src(), 1);
44171
44092
 
44172
44093
  // ../../node_modules/@prisma/instrumentation/dist/index.mjs
44173
- var import_api16 = __toESM(require_src(), 1);
44094
+ var import_api15 = __toESM(require_src(), 1);
44174
44095
  var import_instrumentation9 = __toESM(require_src26(), 1);
44175
- var import_api17 = __toESM(require_src(), 1);
44096
+ var import_api16 = __toESM(require_src(), 1);
44176
44097
  var showAllTraces = process.env.PRISMA_SHOW_ALL_TRACES === "true";
44177
44098
  var nonSampledTraceParent = `00-10-10-00`;
44178
44099
  function engineSpanKindToOtelSpanKind(engineSpanKind) {
44179
44100
  switch (engineSpanKind) {
44180
44101
  case "client":
44181
- return import_api17.SpanKind.CLIENT;
44102
+ return import_api16.SpanKind.CLIENT;
44182
44103
  case "internal":
44183
44104
  default:
44184
- return import_api17.SpanKind.INTERNAL;
44105
+ return import_api16.SpanKind.INTERNAL;
44185
44106
  }
44186
44107
  }
44187
44108
  var ActiveTracingHelper = class {
@@ -44194,8 +44115,8 @@ var ActiveTracingHelper = class {
44194
44115
  isEnabled() {
44195
44116
  return true;
44196
44117
  }
44197
- getTraceParent(context10) {
44198
- const span = import_api17.trace.getSpanContext(context10 ?? import_api17.context.active());
44118
+ getTraceParent(context9) {
44119
+ const span = import_api16.trace.getSpanContext(context9 ?? import_api16.context.active());
44199
44120
  if (span) {
44200
44121
  return `00-${span.traceId}-${span.spanId}-0${span.traceFlags}`;
44201
44122
  }
@@ -44210,7 +44131,7 @@ var ActiveTracingHelper = class {
44210
44131
  }
44211
44132
  }
44212
44133
  getActiveContext() {
44213
- return import_api17.context.active();
44134
+ return import_api16.context.active();
44214
44135
  }
44215
44136
  runInChildSpan(options, callback) {
44216
44137
  if (typeof options === "string") {
@@ -44220,16 +44141,16 @@ var ActiveTracingHelper = class {
44220
44141
  return callback();
44221
44142
  }
44222
44143
  const tracer = this.tracerProvider.getTracer("prisma");
44223
- const context10 = options.context ?? this.getActiveContext();
44144
+ const context9 = options.context ?? this.getActiveContext();
44224
44145
  const name = `prisma:client:${options.name}`;
44225
44146
  if (shouldIgnoreSpan2(name, this.ignoreSpanTypes)) {
44226
44147
  return callback();
44227
44148
  }
44228
44149
  if (options.active === false) {
44229
- const span = tracer.startSpan(name, options, context10);
44230
- return endSpan2(span, callback(span, context10));
44150
+ const span = tracer.startSpan(name, options, context9);
44151
+ return endSpan2(span, callback(span, context9));
44231
44152
  }
44232
- return tracer.startActiveSpan(name, options, (span) => endSpan2(span, callback(span, context10)));
44153
+ return tracer.startActiveSpan(name, options, (span) => endSpan2(span, callback(span, context9)));
44233
44154
  }
44234
44155
  };
44235
44156
  function dispatchEngineSpan(tracer, engineSpan, allSpans, linkIds, ignoreSpanTypes) {
@@ -44365,7 +44286,7 @@ var PrismaInstrumentation = class extends import_instrumentation9.Instrumentatio
44365
44286
  const config = this._config;
44366
44287
  const globalValue = {
44367
44288
  helper: new ActiveTracingHelper({
44368
- tracerProvider: this.tracerProvider ?? import_api16.trace.getTracerProvider(),
44289
+ tracerProvider: this.tracerProvider ?? import_api15.trace.getTracerProvider(),
44369
44290
  ignoreSpanTypes: config.ignoreSpanTypes ?? []
44370
44291
  })
44371
44292
  };
@@ -44382,7 +44303,7 @@ var PrismaInstrumentation = class extends import_instrumentation9.Instrumentatio
44382
44303
  };
44383
44304
 
44384
44305
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/prisma.js
44385
- var INTEGRATION_NAME34 = "Prisma";
44306
+ var INTEGRATION_NAME32 = "Prisma";
44386
44307
  function isPrismaV6TracingHelper(helper) {
44387
44308
  return !!helper && typeof helper === "object" && "dispatchEngineSpans" in helper;
44388
44309
  }
@@ -44401,7 +44322,7 @@ class SentryPrismaInteropInstrumentation extends PrismaInstrumentation {
44401
44322
  const prismaTracingHelper = getPrismaTracingHelper();
44402
44323
  if (isPrismaV6TracingHelper(prismaTracingHelper)) {
44403
44324
  prismaTracingHelper.createEngineSpan = (engineSpanEvent) => {
44404
- const tracer = import_api18.trace.getTracer("prismaV5Compatibility");
44325
+ const tracer = import_api17.trace.getTracer("prismaV5Compatibility");
44405
44326
  const initialIdGenerator = tracer._idGenerator;
44406
44327
  if (!initialIdGenerator) {
44407
44328
  consoleSandbox(() => {
@@ -44420,16 +44341,16 @@ class SentryPrismaInteropInstrumentation extends PrismaInstrumentation {
44420
44341
  context: {
44421
44342
  traceId: link.trace_id,
44422
44343
  spanId: link.span_id,
44423
- traceFlags: import_api18.TraceFlags.SAMPLED
44344
+ traceFlags: import_api17.TraceFlags.SAMPLED
44424
44345
  }
44425
44346
  };
44426
44347
  });
44427
- const ctx = import_api18.trace.setSpanContext(import_api18.context.active(), {
44348
+ const ctx = import_api17.trace.setSpanContext(import_api17.context.active(), {
44428
44349
  traceId,
44429
44350
  spanId: parentSpanId,
44430
- traceFlags: import_api18.TraceFlags.SAMPLED
44351
+ traceFlags: import_api17.TraceFlags.SAMPLED
44431
44352
  });
44432
- import_api18.context.with(ctx, () => {
44353
+ import_api17.context.with(ctx, () => {
44433
44354
  const temporaryIdGenerator = {
44434
44355
  generateTraceId: () => {
44435
44356
  return traceId;
@@ -44459,18 +44380,18 @@ class SentryPrismaInteropInstrumentation extends PrismaInstrumentation {
44459
44380
  function engineSpanKindToOTELSpanKind(engineSpanKind) {
44460
44381
  switch (engineSpanKind) {
44461
44382
  case "client":
44462
- return import_api18.SpanKind.CLIENT;
44383
+ return import_api17.SpanKind.CLIENT;
44463
44384
  case "internal":
44464
44385
  default:
44465
- return import_api18.SpanKind.INTERNAL;
44386
+ return import_api17.SpanKind.INTERNAL;
44466
44387
  }
44467
44388
  }
44468
- var instrumentPrisma = generateInstrumentOnce(INTEGRATION_NAME34, (_options) => {
44389
+ var instrumentPrisma = generateInstrumentOnce(INTEGRATION_NAME32, (_options) => {
44469
44390
  return new SentryPrismaInteropInstrumentation;
44470
44391
  });
44471
44392
  var prismaIntegration = defineIntegration((_options) => {
44472
44393
  return {
44473
- name: INTEGRATION_NAME34,
44394
+ name: INTEGRATION_NAME32,
44474
44395
  setupOnce() {
44475
44396
  instrumentPrisma();
44476
44397
  },
@@ -44496,11 +44417,11 @@ var prismaIntegration = defineIntegration((_options) => {
44496
44417
 
44497
44418
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/hapi/index.js
44498
44419
  var import_instrumentation_hapi = __toESM(require_src27(), 1);
44499
- var INTEGRATION_NAME35 = "Hapi";
44500
- var instrumentHapi = generateInstrumentOnce(INTEGRATION_NAME35, () => new import_instrumentation_hapi.HapiInstrumentation);
44420
+ var INTEGRATION_NAME33 = "Hapi";
44421
+ var instrumentHapi = generateInstrumentOnce(INTEGRATION_NAME33, () => new import_instrumentation_hapi.HapiInstrumentation);
44501
44422
  var _hapiIntegration = () => {
44502
44423
  return {
44503
- name: INTEGRATION_NAME35,
44424
+ name: INTEGRATION_NAME33,
44504
44425
  setupOnce() {
44505
44426
  instrumentHapi();
44506
44427
  }
@@ -44522,7 +44443,7 @@ var HonoTypes = {
44522
44443
  };
44523
44444
 
44524
44445
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/hono/instrumentation.js
44525
- var import_api19 = __toESM(require_src(), 1);
44446
+ var import_api18 = __toESM(require_src(), 1);
44526
44447
  var import_instrumentation11 = __toESM(require_src6(), 1);
44527
44448
  var PACKAGE_NAME3 = "@sentry/instrumentation-hono";
44528
44449
  var PACKAGE_VERSION3 = "0.0.1";
@@ -44618,7 +44539,7 @@ class HonoInstrumentation extends import_instrumentation11.InstrumentationBase {
44618
44539
  }
44619
44540
  const path8 = c.req.path;
44620
44541
  const span = instrumentation.tracer.startSpan(path8);
44621
- return import_api19.context.with(import_api19.trace.setSpan(import_api19.context.active(), span), () => {
44542
+ return import_api18.context.with(import_api18.trace.setSpan(import_api18.context.active(), span), () => {
44622
44543
  return instrumentation._safeExecute(() => {
44623
44544
  const result = handler.apply(this, [c, next]);
44624
44545
  if (isThenable(result)) {
@@ -44667,7 +44588,7 @@ class HonoInstrumentation extends import_instrumentation11.InstrumentationBase {
44667
44588
  _handleError(span, error2) {
44668
44589
  if (error2 instanceof Error) {
44669
44590
  span.setStatus({
44670
- code: import_api19.SpanStatusCode.ERROR,
44591
+ code: import_api18.SpanStatusCode.ERROR,
44671
44592
  message: error2.message
44672
44593
  });
44673
44594
  span.recordException(error2);
@@ -44676,7 +44597,7 @@ class HonoInstrumentation extends import_instrumentation11.InstrumentationBase {
44676
44597
  }
44677
44598
 
44678
44599
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/hono/index.js
44679
- var INTEGRATION_NAME36 = "Hono";
44600
+ var INTEGRATION_NAME34 = "Hono";
44680
44601
  function addHonoSpanAttributes(span) {
44681
44602
  const attributes = spanToJSON(span).data;
44682
44603
  const type = attributes[AttributeNames2.HONO_TYPE];
@@ -44701,14 +44622,14 @@ function addHonoSpanAttributes(span) {
44701
44622
  getIsolationScope().setTransactionName(`${method} ${route}`);
44702
44623
  }
44703
44624
  }
44704
- var instrumentHono = generateInstrumentOnce(INTEGRATION_NAME36, () => new HonoInstrumentation({
44625
+ var instrumentHono = generateInstrumentOnce(INTEGRATION_NAME34, () => new HonoInstrumentation({
44705
44626
  responseHook: (span) => {
44706
44627
  addHonoSpanAttributes(span);
44707
44628
  }
44708
44629
  }));
44709
44630
  var _honoIntegration = () => {
44710
44631
  return {
44711
- name: INTEGRATION_NAME36,
44632
+ name: INTEGRATION_NAME34,
44712
44633
  setupOnce() {
44713
44634
  instrumentHono();
44714
44635
  }
@@ -44719,8 +44640,8 @@ var honoIntegration = defineIntegration(_honoIntegration);
44719
44640
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/koa.js
44720
44641
  var import_instrumentation_koa = __toESM(require_src28(), 1);
44721
44642
  var import_semantic_conventions7 = __toESM(require_src2(), 1);
44722
- var INTEGRATION_NAME37 = "Koa";
44723
- var instrumentKoa = generateInstrumentOnce(INTEGRATION_NAME37, import_instrumentation_koa.KoaInstrumentation, (options = {}) => {
44643
+ var INTEGRATION_NAME35 = "Koa";
44644
+ var instrumentKoa = generateInstrumentOnce(INTEGRATION_NAME35, import_instrumentation_koa.KoaInstrumentation, (options = {}) => {
44724
44645
  return {
44725
44646
  ignoreLayersType: options.ignoreLayersType,
44726
44647
  requestHook(span, info) {
@@ -44748,7 +44669,7 @@ var instrumentKoa = generateInstrumentOnce(INTEGRATION_NAME37, import_instrument
44748
44669
  });
44749
44670
  var _koaIntegration = (options = {}) => {
44750
44671
  return {
44751
- name: INTEGRATION_NAME37,
44672
+ name: INTEGRATION_NAME35,
44752
44673
  setupOnce() {
44753
44674
  instrumentKoa(options);
44754
44675
  }
@@ -44758,11 +44679,11 @@ var koaIntegration = defineIntegration(_koaIntegration);
44758
44679
 
44759
44680
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/connect.js
44760
44681
  var import_instrumentation_connect = __toESM(require_src29(), 1);
44761
- var INTEGRATION_NAME38 = "Connect";
44762
- var instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME38, () => new import_instrumentation_connect.ConnectInstrumentation);
44682
+ var INTEGRATION_NAME36 = "Connect";
44683
+ var instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME36, () => new import_instrumentation_connect.ConnectInstrumentation);
44763
44684
  var _connectIntegration = () => {
44764
44685
  return {
44765
- name: INTEGRATION_NAME38,
44686
+ name: INTEGRATION_NAME36,
44766
44687
  setupOnce() {
44767
44688
  instrumentConnect();
44768
44689
  }
@@ -44780,12 +44701,12 @@ var TEDIUS_INSTRUMENTED_METHODS = new Set([
44780
44701
  "prepare",
44781
44702
  "execute"
44782
44703
  ]);
44783
- var INTEGRATION_NAME39 = "Tedious";
44784
- var instrumentTedious = generateInstrumentOnce(INTEGRATION_NAME39, () => new import_instrumentation_tedious.TediousInstrumentation({}));
44704
+ var INTEGRATION_NAME37 = "Tedious";
44705
+ var instrumentTedious = generateInstrumentOnce(INTEGRATION_NAME37, () => new import_instrumentation_tedious.TediousInstrumentation({}));
44785
44706
  var _tediousIntegration = () => {
44786
44707
  let instrumentationWrappedCallback;
44787
44708
  return {
44788
- name: INTEGRATION_NAME39,
44709
+ name: INTEGRATION_NAME37,
44789
44710
  setupOnce() {
44790
44711
  const instrumentation = instrumentTedious();
44791
44712
  instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);
@@ -44808,12 +44729,12 @@ var tediousIntegration = defineIntegration(_tediousIntegration);
44808
44729
 
44809
44730
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/genericPool.js
44810
44731
  var import_instrumentation_generic_pool = __toESM(require_src31(), 1);
44811
- var INTEGRATION_NAME40 = "GenericPool";
44812
- var instrumentGenericPool = generateInstrumentOnce(INTEGRATION_NAME40, () => new import_instrumentation_generic_pool.GenericPoolInstrumentation({}));
44732
+ var INTEGRATION_NAME38 = "GenericPool";
44733
+ var instrumentGenericPool = generateInstrumentOnce(INTEGRATION_NAME38, () => new import_instrumentation_generic_pool.GenericPoolInstrumentation({}));
44813
44734
  var _genericPoolIntegration = () => {
44814
44735
  let instrumentationWrappedCallback;
44815
44736
  return {
44816
- name: INTEGRATION_NAME40,
44737
+ name: INTEGRATION_NAME38,
44817
44738
  setupOnce() {
44818
44739
  const instrumentation = instrumentGenericPool();
44819
44740
  instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);
@@ -44834,7 +44755,7 @@ var genericPoolIntegration = defineIntegration(_genericPoolIntegration);
44834
44755
 
44835
44756
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/amqplib.js
44836
44757
  var import_instrumentation_amqplib = __toESM(require_src32(), 1);
44837
- var INTEGRATION_NAME41 = "Amqplib";
44758
+ var INTEGRATION_NAME39 = "Amqplib";
44838
44759
  var config = {
44839
44760
  consumeEndHook: (span) => {
44840
44761
  addOriginToSpan2(span, "auto.amqplib.otel.consumer");
@@ -44843,10 +44764,10 @@ var config = {
44843
44764
  addOriginToSpan2(span, "auto.amqplib.otel.publisher");
44844
44765
  }
44845
44766
  };
44846
- var instrumentAmqplib = generateInstrumentOnce(INTEGRATION_NAME41, () => new import_instrumentation_amqplib.AmqplibInstrumentation(config));
44767
+ var instrumentAmqplib = generateInstrumentOnce(INTEGRATION_NAME39, () => new import_instrumentation_amqplib.AmqplibInstrumentation(config));
44847
44768
  var _amqplibIntegration = () => {
44848
44769
  return {
44849
- name: INTEGRATION_NAME41,
44770
+ name: INTEGRATION_NAME39,
44850
44771
  setupOnce() {
44851
44772
  instrumentAmqplib();
44852
44773
  }
@@ -44855,7 +44776,7 @@ var _amqplibIntegration = () => {
44855
44776
  var amqplibIntegration = defineIntegration(_amqplibIntegration);
44856
44777
 
44857
44778
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/vercelai/constants.js
44858
- var INTEGRATION_NAME42 = "VercelAI";
44779
+ var INTEGRATION_NAME40 = "VercelAI";
44859
44780
 
44860
44781
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/vercelai/instrumentation.js
44861
44782
  var import_instrumentation13 = __toESM(require_src6(), 1);
@@ -44958,7 +44879,7 @@ class SentryVercelAiInstrumentation extends import_instrumentation13.Instrumenta
44958
44879
  const existingExperimentalTelemetry = args[0].experimental_telemetry || {};
44959
44880
  const isEnabled3 = existingExperimentalTelemetry.isEnabled;
44960
44881
  const client = getClient();
44961
- const integration = client?.getIntegrationByName(INTEGRATION_NAME42);
44882
+ const integration = client?.getIntegrationByName(INTEGRATION_NAME40);
44962
44883
  const integrationOptions = integration?.options;
44963
44884
  const shouldRecordInputsAndOutputs = integration ? Boolean(client?.getOptions().sendDefaultPii) : false;
44964
44885
  const { recordInputs, recordOutputs } = determineRecordingSettings(integrationOptions, existingExperimentalTelemetry, isEnabled3, shouldRecordInputsAndOutputs);
@@ -44994,7 +44915,7 @@ class SentryVercelAiInstrumentation extends import_instrumentation13.Instrumenta
44994
44915
  }
44995
44916
 
44996
44917
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/vercelai/index.js
44997
- var instrumentVercelAi = generateInstrumentOnce(INTEGRATION_NAME42, () => new SentryVercelAiInstrumentation({}));
44918
+ var instrumentVercelAi = generateInstrumentOnce(INTEGRATION_NAME40, () => new SentryVercelAiInstrumentation({}));
44998
44919
  function shouldForceIntegration(client) {
44999
44920
  const modules = client.getIntegrationByName("Modules");
45000
44921
  return !!modules?.getModules?.()?.ai;
@@ -45002,7 +44923,7 @@ function shouldForceIntegration(client) {
45002
44923
  var _vercelAIIntegration = (options = {}) => {
45003
44924
  let instrumentation;
45004
44925
  return {
45005
- name: INTEGRATION_NAME42,
44926
+ name: INTEGRATION_NAME40,
45006
44927
  options,
45007
44928
  setupOnce() {
45008
44929
  instrumentation = instrumentVercelAi();
@@ -45236,7 +45157,7 @@ var googleGenAIIntegration = defineIntegration(_googleGenAIIntegration);
45236
45157
  var import_instrumentation22 = __toESM(require_src6(), 1);
45237
45158
 
45238
45159
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/firebase/otel/patches/firestore.js
45239
- var import_api20 = __toESM(require_src(), 1);
45160
+ var import_api19 = __toESM(require_src(), 1);
45240
45161
  var import_instrumentation21 = __toESM(require_src6(), 1);
45241
45162
  var import_semantic_conventions8 = __toESM(require_src2(), 1);
45242
45163
  import * as net2 from "node:net";
@@ -45250,7 +45171,7 @@ function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config
45250
45171
  if (!error2) {
45251
45172
  return;
45252
45173
  }
45253
- import_api20.diag.error(error2?.message);
45174
+ import_api19.diag.error(error2?.message);
45254
45175
  }, true);
45255
45176
  };
45256
45177
  }
@@ -45327,7 +45248,7 @@ function patchSetDoc(tracer, firestoreSpanCreationHook) {
45327
45248
  };
45328
45249
  }
45329
45250
  function executeContextWithSpan(span, callback) {
45330
- return import_api20.context.with(import_api20.trace.setSpan(import_api20.context.active(), span), () => {
45251
+ return import_api19.context.with(import_api19.trace.setSpan(import_api19.context.active(), span), () => {
45331
45252
  return import_instrumentation21.safeExecuteInTheMiddle(() => {
45332
45253
  return callback();
45333
45254
  }, (err) => {
@@ -45339,7 +45260,7 @@ function executeContextWithSpan(span, callback) {
45339
45260
  });
45340
45261
  }
45341
45262
  function startDBSpan(tracer, spanName, reference) {
45342
- const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: import_api20.SpanKind.CLIENT });
45263
+ const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: import_api19.SpanKind.CLIENT });
45343
45264
  addAttributes(span, reference);
45344
45265
  span.setAttribute(import_semantic_conventions8.ATTR_DB_OPERATION_NAME, spanName);
45345
45266
  return span;
@@ -45421,17 +45342,17 @@ class FirebaseInstrumentation extends import_instrumentation22.InstrumentationBa
45421
45342
  }
45422
45343
 
45423
45344
  // ../../node_modules/@sentry/node/build/esm/integrations/tracing/firebase/firebase.js
45424
- var INTEGRATION_NAME43 = "Firebase";
45345
+ var INTEGRATION_NAME41 = "Firebase";
45425
45346
  var config2 = {
45426
45347
  firestoreSpanCreationHook: (span) => {
45427
45348
  addOriginToSpan2(span, "auto.firebase.otel.firestore");
45428
45349
  span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, "db.query");
45429
45350
  }
45430
45351
  };
45431
- var instrumentFirebase = generateInstrumentOnce(INTEGRATION_NAME43, () => new FirebaseInstrumentation(config2));
45352
+ var instrumentFirebase = generateInstrumentOnce(INTEGRATION_NAME41, () => new FirebaseInstrumentation(config2));
45432
45353
  var _firebaseIntegration = () => {
45433
45354
  return {
45434
- name: INTEGRATION_NAME43,
45355
+ name: INTEGRATION_NAME41,
45435
45356
  setupOnce() {
45436
45357
  instrumentFirebase();
45437
45358
  }
@@ -45471,7 +45392,7 @@ function getAutoPerformanceIntegrations() {
45471
45392
  }
45472
45393
 
45473
45394
  // ../../node_modules/@sentry/node/build/esm/sdk/initOtel.js
45474
- var import_api21 = __toESM(require_src(), 1);
45395
+ var import_api20 = __toESM(require_src(), 1);
45475
45396
  var import_resources = __toESM(require_src8(), 1);
45476
45397
  var import_sdk_trace_base2 = __toESM(require_src9(), 1);
45477
45398
  var import_semantic_conventions9 = __toESM(require_src2(), 1);
@@ -45499,9 +45420,9 @@ function setupOtel(client, options = {}) {
45499
45420
  ...options.spanProcessors || []
45500
45421
  ]
45501
45422
  });
45502
- import_api21.trace.setGlobalTracerProvider(provider);
45503
- import_api21.propagation.setGlobalPropagator(new SentryPropagator);
45504
- import_api21.context.setGlobalContextManager(new SentryContextManager);
45423
+ import_api20.trace.setGlobalTracerProvider(provider);
45424
+ import_api20.propagation.setGlobalPropagator(new SentryPropagator);
45425
+ import_api20.context.setGlobalContextManager(new SentryContextManager);
45505
45426
  return provider;
45506
45427
  }
45507
45428
  function _clampSpanProcessorTimeout(maxSpanWaitDuration) {