@fml-inc/fml 0.0.22 → 0.0.24

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.
@@ -2,16 +2,16 @@ import {
2
2
  __export
3
3
  } from "./chunk-PZ5AY32C.js";
4
4
 
5
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/debug-build.js
5
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/debug-build.js
6
6
  var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
7
7
 
8
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/worldwide.js
8
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/worldwide.js
9
9
  var GLOBAL_OBJ = globalThis;
10
10
 
11
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/version.js
12
- var SDK_VERSION = "10.43.0";
11
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/version.js
12
+ var SDK_VERSION = "10.47.0";
13
13
 
14
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/carrier.js
14
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/carrier.js
15
15
  function getMainCarrier() {
16
16
  getSentryCarrier(GLOBAL_OBJ);
17
17
  return GLOBAL_OBJ;
@@ -27,7 +27,7 @@ function getGlobalSingleton(name, creator, obj = GLOBAL_OBJ) {
27
27
  return carrier[name] || (carrier[name] = creator());
28
28
  }
29
29
 
30
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/debug-logger.js
30
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/debug-logger.js
31
31
  var CONSOLE_LEVELS = [
32
32
  "debug",
33
33
  "info",
@@ -108,7 +108,7 @@ var debug = {
108
108
  error
109
109
  };
110
110
 
111
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/stacktrace.js
111
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/stacktrace.js
112
112
  var STACKTRACE_FRAME_LIMIT = 50;
113
113
  var UNKNOWN_FUNCTION = "?";
114
114
  var WEBPACK_ERROR_REGEXP = /\(error: (.*)\)/;
@@ -211,7 +211,7 @@ function normalizeStackTracePath(path) {
211
211
  return filename;
212
212
  }
213
213
 
214
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/instrument/handlers.js
214
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/instrument/handlers.js
215
215
  var handlers = {};
216
216
  var instrumented = {};
217
217
  function addHandler(type, handler) {
@@ -253,7 +253,7 @@ Error:`,
253
253
  }
254
254
  }
255
255
 
256
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/instrument/globalError.js
256
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/instrument/globalError.js
257
257
  var _oldOnErrorHandler = null;
258
258
  function addGlobalErrorInstrumentationHandler(handler) {
259
259
  const type = "error";
@@ -279,7 +279,7 @@ function instrumentError() {
279
279
  GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__ = true;
280
280
  }
281
281
 
282
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/instrument/globalUnhandledRejection.js
282
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/instrument/globalUnhandledRejection.js
283
283
  var _oldOnUnhandledRejectionHandler = null;
284
284
  function addGlobalUnhandledRejectionInstrumentationHandler(handler) {
285
285
  const type = "unhandledrejection";
@@ -299,7 +299,7 @@ function instrumentUnhandledRejection() {
299
299
  GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
300
300
  }
301
301
 
302
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/is.js
302
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/is.js
303
303
  var objectToString = Object.prototype.toString;
304
304
  function isError(wat) {
305
305
  switch (objectToString.call(wat)) {
@@ -365,7 +365,7 @@ function isRequest(request) {
365
365
  return typeof Request !== "undefined" && isInstanceOf(request, Request);
366
366
  }
367
367
 
368
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/browser.js
368
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/browser.js
369
369
  var WINDOW = GLOBAL_OBJ;
370
370
  var DEFAULT_MAX_STRING_LENGTH = 80;
371
371
  function htmlTreeAsString(elem, options = {}) {
@@ -431,8 +431,7 @@ function _htmlElementAsString(el, keyAttrs) {
431
431
  }
432
432
  }
433
433
  }
434
- const allowedAttrs = ["aria-label", "type", "name", "title", "alt"];
435
- for (const k of allowedAttrs) {
434
+ for (const k of ["aria-label", "type", "name", "title", "alt"]) {
436
435
  const attr = elem.getAttribute(k);
437
436
  if (attr) {
438
437
  out.push(`[${k}="${attr}"]`);
@@ -470,7 +469,7 @@ function getComponentName(elem) {
470
469
  return null;
471
470
  }
472
471
 
473
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/object.js
472
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/object.js
474
473
  function fill(source, name, replacementFactory) {
475
474
  if (!(name in source)) {
476
475
  return;
@@ -544,16 +543,9 @@ function serializeEventTarget(target) {
544
543
  }
545
544
  function getOwnProperties(obj) {
546
545
  if (typeof obj === "object" && obj !== null) {
547
- const extractedProps = {};
548
- for (const property in obj) {
549
- if (Object.prototype.hasOwnProperty.call(obj, property)) {
550
- extractedProps[property] = obj[property];
551
- }
552
- }
553
- return extractedProps;
554
- } else {
555
- return {};
546
+ return Object.fromEntries(Object.entries(obj));
556
547
  }
548
+ return {};
557
549
  }
558
550
  function extractExceptionKeysForMessage(exception) {
559
551
  const keys = Object.keys(convertToPlainObject(exception));
@@ -623,7 +615,7 @@ function objectify(wat) {
623
615
  return objectified;
624
616
  }
625
617
 
626
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/randomSafeContext.js
618
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/randomSafeContext.js
627
619
  var RESOLVED_RUNNER;
628
620
  function withRandomSafeContext(cb) {
629
621
  if (RESOLVED_RUNNER !== void 0) {
@@ -645,7 +637,7 @@ function safeDateNow() {
645
637
  return withRandomSafeContext(() => Date.now());
646
638
  }
647
639
 
648
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/string.js
640
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/string.js
649
641
  function truncate(str, max = 0) {
650
642
  if (typeof str !== "string" || max === 0) {
651
643
  return str;
@@ -716,7 +708,7 @@ function stringMatchesSomePattern(testString, patterns = [], requireExactStringM
716
708
  return patterns.some((pattern) => isMatchingPattern(testString, pattern, requireExactStringMatch));
717
709
  }
718
710
 
719
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/misc.js
711
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/misc.js
720
712
  function getCrypto() {
721
713
  const gbl = GLOBAL_OBJ;
722
714
  return gbl.crypto || gbl.msCrypto;
@@ -829,7 +821,7 @@ function isAlreadyCaptured(exception) {
829
821
  }
830
822
  }
831
823
 
832
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/time.js
824
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/time.js
833
825
  var ONE_SECOND_IN_MS = 1e3;
834
826
  function dateTimestampInSeconds() {
835
827
  return safeDateNow() / ONE_SECOND_IN_MS;
@@ -881,7 +873,7 @@ function browserPerformanceTimeOrigin() {
881
873
  return cachedTimeOrigin;
882
874
  }
883
875
 
884
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/session.js
876
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/session.js
885
877
  function makeSession(context) {
886
878
  const startingTime = timestampInSeconds();
887
879
  const session = {
@@ -985,7 +977,7 @@ function sessionToJSON(session) {
985
977
  };
986
978
  }
987
979
 
988
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/merge.js
980
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/merge.js
989
981
  function merge(initialObj, mergeObj, levels = 2) {
990
982
  if (!mergeObj || typeof mergeObj !== "object" || levels <= 0) {
991
983
  return mergeObj;
@@ -1002,7 +994,7 @@ function merge(initialObj, mergeObj, levels = 2) {
1002
994
  return output;
1003
995
  }
1004
996
 
1005
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/propagationContext.js
997
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/propagationContext.js
1006
998
  function generateTraceId() {
1007
999
  return uuid4();
1008
1000
  }
@@ -1010,7 +1002,7 @@ function generateSpanId() {
1010
1002
  return uuid4().substring(16);
1011
1003
  }
1012
1004
 
1013
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/spanOnScope.js
1005
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/spanOnScope.js
1014
1006
  var SCOPE_SPAN_FIELD = "_sentrySpan";
1015
1007
  function _setSpanForScope(scope, span) {
1016
1008
  if (span) {
@@ -1023,7 +1015,7 @@ function _getSpanForScope(scope) {
1023
1015
  return scope[SCOPE_SPAN_FIELD];
1024
1016
  }
1025
1017
 
1026
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/scope.js
1018
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/scope.js
1027
1019
  var DEFAULT_MAX_BREADCRUMBS = 100;
1028
1020
  var Scope = class _Scope {
1029
1021
  /** Flag if notifying is happening. */
@@ -1587,7 +1579,7 @@ var Scope = class _Scope {
1587
1579
  }
1588
1580
  };
1589
1581
 
1590
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/defaultScopes.js
1582
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/defaultScopes.js
1591
1583
  function getDefaultCurrentScope() {
1592
1584
  return getGlobalSingleton("defaultCurrentScope", () => new Scope());
1593
1585
  }
@@ -1595,7 +1587,44 @@ function getDefaultIsolationScope() {
1595
1587
  return getGlobalSingleton("defaultIsolationScope", () => new Scope());
1596
1588
  }
1597
1589
 
1598
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js
1590
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/chain-and-copy-promiselike.js
1591
+ var isActualPromise = (p) => p instanceof Promise && !p[kChainedCopy];
1592
+ var kChainedCopy = /* @__PURE__ */ Symbol("chained PromiseLike");
1593
+ var chainAndCopyPromiseLike = (original, onSuccess, onError) => {
1594
+ const chained = original.then(
1595
+ (value) => {
1596
+ onSuccess(value);
1597
+ return value;
1598
+ },
1599
+ (err) => {
1600
+ onError(err);
1601
+ throw err;
1602
+ }
1603
+ );
1604
+ return isActualPromise(chained) && isActualPromise(original) ? chained : copyProps(original, chained);
1605
+ };
1606
+ var copyProps = (original, chained) => {
1607
+ let mutated = false;
1608
+ for (const key in original) {
1609
+ if (key in chained) continue;
1610
+ mutated = true;
1611
+ const value = original[key];
1612
+ if (typeof value === "function") {
1613
+ Object.defineProperty(chained, key, {
1614
+ value: (...args) => value.apply(original, args),
1615
+ enumerable: true,
1616
+ configurable: true,
1617
+ writable: true
1618
+ });
1619
+ } else {
1620
+ chained[key] = value;
1621
+ }
1622
+ }
1623
+ if (mutated) Object.assign(chained, { [kChainedCopy]: true });
1624
+ return chained;
1625
+ };
1626
+
1627
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/asyncContext/stackStrategy.js
1599
1628
  var AsyncContextStack = class {
1600
1629
  constructor(scope, isolationScope) {
1601
1630
  let assignedScope;
@@ -1626,15 +1655,10 @@ var AsyncContextStack = class {
1626
1655
  throw e;
1627
1656
  }
1628
1657
  if (isThenable(maybePromiseResult)) {
1629
- return maybePromiseResult.then(
1630
- (res) => {
1631
- this._popScope();
1632
- return res;
1633
- },
1634
- (e) => {
1635
- this._popScope();
1636
- throw e;
1637
- }
1658
+ return chainAndCopyPromiseLike(
1659
+ maybePromiseResult,
1660
+ () => this._popScope(),
1661
+ () => this._popScope()
1638
1662
  );
1639
1663
  }
1640
1664
  this._popScope();
@@ -1716,7 +1740,7 @@ function getStackAsyncContextStrategy() {
1716
1740
  };
1717
1741
  }
1718
1742
 
1719
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/asyncContext/index.js
1743
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/asyncContext/index.js
1720
1744
  function setAsyncContextStrategy(strategy) {
1721
1745
  const registry = getMainCarrier();
1722
1746
  const sentry = getSentryCarrier(registry);
@@ -1730,7 +1754,17 @@ function getAsyncContextStrategy(carrier) {
1730
1754
  return getStackAsyncContextStrategy();
1731
1755
  }
1732
1756
 
1733
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/currentScopes.js
1757
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/currentScopes.js
1758
+ var _externalPropagationContextProvider;
1759
+ function registerExternalPropagationContext(fn) {
1760
+ _externalPropagationContextProvider = fn;
1761
+ }
1762
+ function getExternalPropagationContext() {
1763
+ return _externalPropagationContextProvider?.();
1764
+ }
1765
+ function hasExternalPropagationContext() {
1766
+ return _externalPropagationContextProvider !== void 0;
1767
+ }
1734
1768
  function getCurrentScope() {
1735
1769
  const carrier = getMainCarrier();
1736
1770
  const acs = getAsyncContextStrategy(carrier);
@@ -1772,6 +1806,10 @@ function getClient() {
1772
1806
  return getCurrentScope().getClient();
1773
1807
  }
1774
1808
  function getTraceContextFromScope(scope) {
1809
+ const externalContext = getExternalPropagationContext();
1810
+ if (externalContext) {
1811
+ return { trace_id: externalContext.traceId, span_id: externalContext.spanId };
1812
+ }
1775
1813
  const propagationContext = scope.getPropagationContext();
1776
1814
  const { traceId, parentSpanId, propagationSpanId } = propagationContext;
1777
1815
  const traceContext = {
@@ -1784,7 +1822,7 @@ function getTraceContextFromScope(scope) {
1784
1822
  return traceContext;
1785
1823
  }
1786
1824
 
1787
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/semanticAttributes.js
1825
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/semanticAttributes.js
1788
1826
  var SEMANTIC_ATTRIBUTE_SENTRY_SOURCE = "sentry.source";
1789
1827
  var SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE = "sentry.sample_rate";
1790
1828
  var SEMANTIC_ATTRIBUTE_SENTRY_PREVIOUS_TRACE_SAMPLE_RATE = "sentry.previous_trace_sample_rate";
@@ -1804,7 +1842,7 @@ var SEMANTIC_ATTRIBUTE_URL_FULL = "url.full";
1804
1842
  var SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE = "sentry.link.type";
1805
1843
  var GEN_AI_CONVERSATION_ID_ATTRIBUTE = "gen_ai.conversation.id";
1806
1844
 
1807
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/spanstatus.js
1845
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/spanstatus.js
1808
1846
  var SPAN_STATUS_UNSET = 0;
1809
1847
  var SPAN_STATUS_OK = 1;
1810
1848
  var SPAN_STATUS_ERROR = 2;
@@ -1854,7 +1892,7 @@ function setHttpStatus(span, httpStatus) {
1854
1892
  }
1855
1893
  }
1856
1894
 
1857
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/utils.js
1895
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/utils.js
1858
1896
  var SCOPE_ON_START_SPAN_FIELD = "_sentryScope";
1859
1897
  var ISOLATION_SCOPE_ON_START_SPAN_FIELD = "_sentryIsolationScope";
1860
1898
  function wrapScopeWithWeakRef(scope) {
@@ -1894,7 +1932,7 @@ function getCapturedScopesOnSpan(span) {
1894
1932
  };
1895
1933
  }
1896
1934
 
1897
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/baggage.js
1935
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/baggage.js
1898
1936
  var SENTRY_BAGGAGE_KEY_PREFIX = "sentry-";
1899
1937
  var SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;
1900
1938
  var MAX_BAGGAGE_STRING_LENGTH = 8192;
@@ -1904,7 +1942,7 @@ function baggageHeaderToDynamicSamplingContext(baggageHeader) {
1904
1942
  return void 0;
1905
1943
  }
1906
1944
  const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {
1907
- if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {
1945
+ if (key.startsWith(SENTRY_BAGGAGE_KEY_PREFIX)) {
1908
1946
  const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);
1909
1947
  acc[nonPrefixedKey] = value;
1910
1948
  }
@@ -1986,7 +2024,7 @@ function objectToBaggageHeader(object) {
1986
2024
  }, "");
1987
2025
  }
1988
2026
 
1989
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/dsn.js
2027
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/dsn.js
1990
2028
  var ORG_ID_REGEX = /^o(\d+)\./;
1991
2029
  var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
1992
2030
  function isValidProtocol(protocol) {
@@ -2084,7 +2122,7 @@ function makeDsn(from) {
2084
2122
  return components;
2085
2123
  }
2086
2124
 
2087
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/parseSampleRate.js
2125
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/parseSampleRate.js
2088
2126
  function parseSampleRate(sampleRate) {
2089
2127
  if (typeof sampleRate === "boolean") {
2090
2128
  return Number(sampleRate);
@@ -2096,7 +2134,7 @@ function parseSampleRate(sampleRate) {
2096
2134
  return rate;
2097
2135
  }
2098
2136
 
2099
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/tracing.js
2137
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/tracing.js
2100
2138
  var TRACEPARENT_REGEXP = new RegExp(
2101
2139
  "^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$"
2102
2140
  // whitespace
@@ -2192,7 +2230,7 @@ function shouldContinueTrace(client, baggageOrgId) {
2192
2230
  return true;
2193
2231
  }
2194
2232
 
2195
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/spanUtils.js
2233
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/spanUtils.js
2196
2234
  var TRACE_FLAG_NONE = 0;
2197
2235
  var TRACE_FLAG_SAMPLED = 1;
2198
2236
  var hasShownSpanDropWarning = false;
@@ -2371,7 +2409,7 @@ function updateSpanName(span, name) {
2371
2409
  });
2372
2410
  }
2373
2411
 
2374
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/errors.js
2412
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/errors.js
2375
2413
  var errorsInstrumented = false;
2376
2414
  function registerSpanErrorInstrumentation() {
2377
2415
  if (errorsInstrumented) {
@@ -2392,7 +2430,7 @@ function registerSpanErrorInstrumentation() {
2392
2430
  addGlobalUnhandledRejectionInstrumentationHandler(errorCallback);
2393
2431
  }
2394
2432
 
2395
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/hasSpansEnabled.js
2433
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/hasSpansEnabled.js
2396
2434
  function hasSpansEnabled(maybeOptions) {
2397
2435
  if (typeof __SENTRY_TRACING__ === "boolean" && !__SENTRY_TRACING__) {
2398
2436
  return false;
@@ -2402,7 +2440,7 @@ function hasSpansEnabled(maybeOptions) {
2402
2440
  (options.tracesSampleRate != null || !!options.tracesSampler);
2403
2441
  }
2404
2442
 
2405
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/should-ignore-span.js
2443
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/should-ignore-span.js
2406
2444
  function logIgnoredSpan(droppedSpan) {
2407
2445
  debug.log(`Ignoring span ${droppedSpan.op} - ${droppedSpan.description} because it matches \`ignoreSpans\`.`);
2408
2446
  }
@@ -2446,11 +2484,11 @@ function isStringOrRegExp(value) {
2446
2484
  return typeof value === "string" || value instanceof RegExp;
2447
2485
  }
2448
2486
 
2449
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/constants.js
2487
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/constants.js
2450
2488
  var DEFAULT_ENVIRONMENT = "production";
2451
2489
  var DEV_ENVIRONMENT = "development";
2452
2490
 
2453
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js
2491
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/dynamicSamplingContext.js
2454
2492
  var FROZEN_DSC_FIELD = "_frozenDsc";
2455
2493
  function freezeDscOnSpan(span, dsc) {
2456
2494
  const spanWithMaybeDsc = span;
@@ -2520,7 +2558,7 @@ function spanToBaggageHeader(span) {
2520
2558
  return dynamicSamplingContextToSentryBaggageHeader(dsc);
2521
2559
  }
2522
2560
 
2523
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js
2561
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/sentryNonRecordingSpan.js
2524
2562
  var SentryNonRecordingSpan = class {
2525
2563
  constructor(spanContext = {}) {
2526
2564
  this._traceId = spanContext.traceId || generateTraceId();
@@ -2580,7 +2618,7 @@ var SentryNonRecordingSpan = class {
2580
2618
  }
2581
2619
  };
2582
2620
 
2583
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/normalize.js
2621
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/normalize.js
2584
2622
  function normalize(input, depth = 100, maxProperties = Infinity) {
2585
2623
  try {
2586
2624
  return visit("", input, depth, maxProperties);
@@ -2719,7 +2757,7 @@ function memoBuilder() {
2719
2757
  return [memoize, unmemoize];
2720
2758
  }
2721
2759
 
2722
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/envelope.js
2760
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/envelope.js
2723
2761
  function createEnvelope(headers, items = []) {
2724
2762
  return [headers, items];
2725
2763
  }
@@ -2830,28 +2868,24 @@ function createAttachmentEnvelopeItem(attachment) {
2830
2868
  buffer
2831
2869
  ];
2832
2870
  }
2833
- var ITEM_TYPE_TO_DATA_CATEGORY_MAP = {
2834
- session: "session",
2871
+ var DATA_CATEGORY_OVERRIDES = {
2835
2872
  sessions: "session",
2836
- attachment: "attachment",
2837
- transaction: "transaction",
2838
2873
  event: "error",
2839
2874
  client_report: "internal",
2840
2875
  user_report: "default",
2841
- profile: "profile",
2842
2876
  profile_chunk: "profile",
2843
2877
  replay_event: "replay",
2844
2878
  replay_recording: "replay",
2845
2879
  check_in: "monitor",
2846
- feedback: "feedback",
2847
- span: "span",
2848
2880
  raw_security: "security",
2849
2881
  log: "log_item",
2850
- metric: "metric",
2851
2882
  trace_metric: "metric"
2852
2883
  };
2884
+ function _isOverriddenType(type) {
2885
+ return type in DATA_CATEGORY_OVERRIDES;
2886
+ }
2853
2887
  function envelopeItemTypeToDataCategory(type) {
2854
- return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];
2888
+ return _isOverriddenType(type) ? DATA_CATEGORY_OVERRIDES[type] : type;
2855
2889
  }
2856
2890
  function getSdkMetadataForEnvelopeHeader(metadataOrEvent) {
2857
2891
  if (!metadataOrEvent?.sdk) {
@@ -2873,7 +2907,7 @@ function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
2873
2907
  };
2874
2908
  }
2875
2909
 
2876
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/envelope.js
2910
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/envelope.js
2877
2911
  function _enhanceEventWithSdkInfo(event, newSdkInfo) {
2878
2912
  if (!newSdkInfo) {
2879
2913
  return event;
@@ -2948,7 +2982,7 @@ function createSpanEnvelope(spans, client) {
2948
2982
  return createEnvelope(headers, items);
2949
2983
  }
2950
2984
 
2951
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/logSpans.js
2985
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/logSpans.js
2952
2986
  function logSpanStart(span) {
2953
2987
  if (!DEBUG_BUILD) return;
2954
2988
  const { description = "< unknown name >", op = "< unknown op >", parent_span_id: parentSpanId } = spanToJSON(span);
@@ -2984,7 +3018,7 @@ function logSpanEnd(span) {
2984
3018
  debug.log(msg);
2985
3019
  }
2986
3020
 
2987
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/measurement.js
3021
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/measurement.js
2988
3022
  function setMeasurement(name, value, unit, activeSpan = getActiveSpan()) {
2989
3023
  const rootSpan = activeSpan && getRootSpan(activeSpan);
2990
3024
  if (rootSpan) {
@@ -3011,7 +3045,7 @@ function timedEventsToMeasurements(events) {
3011
3045
  return measurements;
3012
3046
  }
3013
3047
 
3014
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/sentrySpan.js
3048
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/sentrySpan.js
3015
3049
  var MAX_SPAN_COUNT = 1e3;
3016
3050
  var SentrySpan = class {
3017
3051
  /** Epoch timestamp in seconds when the span started. */
@@ -3305,7 +3339,7 @@ function sendSpanEnvelope(envelope) {
3305
3339
  client.sendEnvelope(envelope);
3306
3340
  }
3307
3341
 
3308
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/handleCallbackErrors.js
3342
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/handleCallbackErrors.js
3309
3343
  function handleCallbackErrors(fn, onError, onFinally = () => {
3310
3344
  }, onSuccess = () => {
3311
3345
  }) {
@@ -3321,16 +3355,15 @@ function handleCallbackErrors(fn, onError, onFinally = () => {
3321
3355
  }
3322
3356
  function maybeHandlePromiseRejection(value, onError, onFinally, onSuccess) {
3323
3357
  if (isThenable(value)) {
3324
- return value.then(
3325
- (res) => {
3358
+ return chainAndCopyPromiseLike(
3359
+ value,
3360
+ (result) => {
3326
3361
  onFinally();
3327
- onSuccess(res);
3328
- return res;
3362
+ onSuccess(result);
3329
3363
  },
3330
- (e) => {
3331
- onError(e);
3364
+ (err) => {
3365
+ onError(err);
3332
3366
  onFinally();
3333
- throw e;
3334
3367
  }
3335
3368
  );
3336
3369
  }
@@ -3339,7 +3372,7 @@ function maybeHandlePromiseRejection(value, onError, onFinally, onSuccess) {
3339
3372
  return value;
3340
3373
  }
3341
3374
 
3342
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/sampling.js
3375
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/sampling.js
3343
3376
  function sampleSpan(options, samplingContext, sampleRand) {
3344
3377
  if (!hasSpansEnabled(options)) {
3345
3378
  return [false];
@@ -3392,7 +3425,7 @@ function sampleSpan(options, samplingContext, sampleRand) {
3392
3425
  return [shouldSample, parsedSampleRate, localSampleRateWasApplied];
3393
3426
  }
3394
3427
 
3395
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/trace.js
3428
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/trace.js
3396
3429
  var SUPPRESS_TRACING_KEY = "__SENTRY_SUPPRESS_TRACING__";
3397
3430
  function startSpan(options, callback) {
3398
3431
  const acs = getAcs();
@@ -3532,6 +3565,10 @@ function suppressTracing(callback) {
3532
3565
  });
3533
3566
  }
3534
3567
  function startNewTrace(callback) {
3568
+ const acs = getAcs();
3569
+ if (acs.startNewTrace) {
3570
+ return acs.startNewTrace(callback);
3571
+ }
3535
3572
  return withScope2((scope) => {
3536
3573
  scope.setPropagationContext({
3537
3574
  traceId: generateTraceId(),
@@ -3704,7 +3741,7 @@ function getActiveSpanWrapper(parentSpan) {
3704
3741
  } : (callback) => callback();
3705
3742
  }
3706
3743
 
3707
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/idleSpan.js
3744
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/idleSpan.js
3708
3745
  var TRACING_DEFAULTS = {
3709
3746
  idleTimeout: 1e3,
3710
3747
  finalTimeout: 3e4,
@@ -3915,7 +3952,7 @@ function _startIdleSpan(options) {
3915
3952
  return span;
3916
3953
  }
3917
3954
 
3918
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/syncpromise.js
3955
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/syncpromise.js
3919
3956
  var STATE_PENDING = 0;
3920
3957
  var STATE_RESOLVED = 1;
3921
3958
  var STATE_REJECTED = 2;
@@ -4047,7 +4084,7 @@ var SyncPromise = class _SyncPromise {
4047
4084
  }
4048
4085
  };
4049
4086
 
4050
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/eventProcessors.js
4087
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/eventProcessors.js
4051
4088
  function notifyEventProcessors(processors, event, hint, index = 0) {
4052
4089
  try {
4053
4090
  const result = _notifyEventProcessors(event, hint, processors, index);
@@ -4069,7 +4106,7 @@ function _notifyEventProcessors(event, hint, processors, index) {
4069
4106
  return _notifyEventProcessors(result, hint, processors, index + 1);
4070
4107
  }
4071
4108
 
4072
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/debug-ids.js
4109
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/debug-ids.js
4073
4110
  var parsedStackResults;
4074
4111
  var lastSentryKeysCount;
4075
4112
  var lastNativeKeysCount;
@@ -4141,7 +4178,7 @@ function getDebugImagesForResources(stackParser, resource_paths) {
4141
4178
  return images;
4142
4179
  }
4143
4180
 
4144
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/scopeData.js
4181
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/scopeData.js
4145
4182
  function applyScopeDataToEvent(event, data) {
4146
4183
  const { fingerprint, span, breadcrumbs, sdkProcessingMetadata } = data;
4147
4184
  applyDataToEvent(event, data);
@@ -4263,7 +4300,7 @@ function applyFingerprintToEvent(event, fingerprint) {
4263
4300
  }
4264
4301
  }
4265
4302
 
4266
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/prepareEvent.js
4303
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/prepareEvent.js
4267
4304
  function prepareEvent(options, event, hint, scope, client, isolationScope) {
4268
4305
  const { normalizeDepth = 3, normalizeMaxBreadth = 1e3 } = options;
4269
4306
  const prepared = {
@@ -4456,7 +4493,7 @@ function hintIsScopeContext(hint) {
4456
4493
  return Object.keys(hint).some((key) => captureContextKeys.includes(key));
4457
4494
  }
4458
4495
 
4459
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/exports.js
4496
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/exports.js
4460
4497
  function captureException(exception, hint) {
4461
4498
  return getCurrentScope().captureException(exception, parseEventHintOrCaptureContext(hint));
4462
4499
  }
@@ -4604,7 +4641,7 @@ function captureSession(end = false) {
4604
4641
  _sendSessionUpdate();
4605
4642
  }
4606
4643
 
4607
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/api.js
4644
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/api.js
4608
4645
  var SENTRY_API_VERSION = "7";
4609
4646
  function getBaseApiEndpoint(dsn) {
4610
4647
  const protocol = dsn.protocol ? `${dsn.protocol}:` : "";
@@ -4661,7 +4698,7 @@ function getReportDialogEndpoint(dsnLike, dialogOptions) {
4661
4698
  return `${endpoint}?${encodedOptions}`;
4662
4699
  }
4663
4700
 
4664
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integration.js
4701
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integration.js
4665
4702
  var installedIntegrations = [];
4666
4703
  function filterDuplicates(integrations) {
4667
4704
  const integrationsByName = {};
@@ -4746,7 +4783,7 @@ function defineIntegration(fn) {
4746
4783
  return fn;
4747
4784
  }
4748
4785
 
4749
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/attributes.js
4786
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/attributes.js
4750
4787
  function isAttributeObject(maybeObj) {
4751
4788
  return typeof maybeObj === "object" && maybeObj != null && !Array.isArray(maybeObj) && Object.keys(maybeObj).includes("value");
4752
4789
  }
@@ -4788,7 +4825,25 @@ function getTypedAttributeValue(value) {
4788
4825
  }
4789
4826
  }
4790
4827
 
4791
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/trace-info.js
4828
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/timestampSequence.js
4829
+ var SEQUENCE_ATTR_KEY = "sentry.timestamp.sequence";
4830
+ var _sequenceNumber = 0;
4831
+ var _previousTimestampMs;
4832
+ function getSequenceAttribute(timestampInSeconds2) {
4833
+ const nowMs = Math.floor(timestampInSeconds2 * 1e3);
4834
+ if (_previousTimestampMs !== void 0 && nowMs !== _previousTimestampMs) {
4835
+ _sequenceNumber = 0;
4836
+ }
4837
+ const value = _sequenceNumber;
4838
+ _sequenceNumber++;
4839
+ _previousTimestampMs = nowMs;
4840
+ return {
4841
+ key: SEQUENCE_ATTR_KEY,
4842
+ value: { value, type: "integer" }
4843
+ };
4844
+ }
4845
+
4846
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/trace-info.js
4792
4847
  function _getTraceInfoFromScope(client, scope) {
4793
4848
  if (!scope) {
4794
4849
  return [void 0, void 0];
@@ -4801,7 +4856,7 @@ function _getTraceInfoFromScope(client, scope) {
4801
4856
  });
4802
4857
  }
4803
4858
 
4804
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/logs/constants.js
4859
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/logs/constants.js
4805
4860
  var SEVERITY_TEXT_TO_SEVERITY_NUMBER = {
4806
4861
  trace: 1,
4807
4862
  debug: 5,
@@ -4811,7 +4866,7 @@ var SEVERITY_TEXT_TO_SEVERITY_NUMBER = {
4811
4866
  fatal: 21
4812
4867
  };
4813
4868
 
4814
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/logs/envelope.js
4869
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/logs/envelope.js
4815
4870
  function createLogContainerEnvelopeItem(items) {
4816
4871
  return [
4817
4872
  {
@@ -4838,7 +4893,7 @@ function createLogEnvelope(logs, metadata, tunnel, dsn) {
4838
4893
  return createEnvelope(headers, [createLogContainerEnvelopeItem(logs)]);
4839
4894
  }
4840
4895
 
4841
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/logs/internal.js
4896
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/logs/internal.js
4842
4897
  var MAX_LOG_BUFFER_SIZE = 100;
4843
4898
  function setLogAttribute(logAttributes, key, value, setEvenIfPresent = true) {
4844
4899
  if (value && (!logAttributes[key] || setEvenIfPresent)) {
@@ -4913,15 +4968,18 @@ function _INTERNAL_captureLog(beforeLog, currentScope = getCurrentScope(), captu
4913
4968
  return;
4914
4969
  }
4915
4970
  const { level, message, attributes: logAttributes = {}, severityNumber } = log2;
4971
+ const timestamp = timestampInSeconds();
4972
+ const sequenceAttr = getSequenceAttribute(timestamp);
4916
4973
  const serializedLog = {
4917
- timestamp: timestampInSeconds(),
4974
+ timestamp,
4918
4975
  level,
4919
4976
  body: message,
4920
4977
  trace_id: traceContext?.trace_id,
4921
4978
  severity_number: severityNumber ?? SEVERITY_TEXT_TO_SEVERITY_NUMBER[level],
4922
4979
  attributes: {
4923
4980
  ...serializeAttributes(scopeAttributes),
4924
- ...serializeAttributes(logAttributes, true)
4981
+ ...serializeAttributes(logAttributes, true),
4982
+ [sequenceAttr.key]: sequenceAttr.value
4925
4983
  }
4926
4984
  };
4927
4985
  captureSerializedLog(client, serializedLog);
@@ -4945,7 +5003,7 @@ function _getBufferMap() {
4945
5003
  return getGlobalSingleton("clientToLogBufferMap", () => /* @__PURE__ */ new WeakMap());
4946
5004
  }
4947
5005
 
4948
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/metrics/envelope.js
5006
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/metrics/envelope.js
4949
5007
  function createMetricContainerEnvelopeItem(items) {
4950
5008
  return [
4951
5009
  {
@@ -4972,7 +5030,7 @@ function createMetricEnvelope(metrics, metadata, tunnel, dsn) {
4972
5030
  return createEnvelope(headers, [createMetricContainerEnvelopeItem(metrics)]);
4973
5031
  }
4974
5032
 
4975
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/metrics/internal.js
5033
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/metrics/internal.js
4976
5034
  var MAX_METRIC_BUFFER_SIZE = 1e3;
4977
5035
  function setMetricAttribute(metricAttributes, key, value, setEvenIfPresent = true) {
4978
5036
  if (value && (setEvenIfPresent || !(key in metricAttributes))) {
@@ -5022,8 +5080,10 @@ function _buildSerializedMetric(metric, client, currentScope, scopeAttributes) {
5022
5080
  const span = _getSpanForScope(currentScope);
5023
5081
  const traceId = span ? span.spanContext().traceId : traceContext?.trace_id;
5024
5082
  const spanId = span ? span.spanContext().spanId : void 0;
5083
+ const timestamp = timestampInSeconds();
5084
+ const sequenceAttr = getSequenceAttribute(timestamp);
5025
5085
  return {
5026
- timestamp: timestampInSeconds(),
5086
+ timestamp,
5027
5087
  trace_id: traceId ?? "",
5028
5088
  span_id: spanId,
5029
5089
  name: metric.name,
@@ -5032,7 +5092,8 @@ function _buildSerializedMetric(metric, client, currentScope, scopeAttributes) {
5032
5092
  value: metric.value,
5033
5093
  attributes: {
5034
5094
  ...serializeAttributes(scopeAttributes),
5035
- ...serializeAttributes(metric.attributes, "skip-undefined")
5095
+ ...serializeAttributes(metric.attributes, "skip-undefined"),
5096
+ [sequenceAttr.key]: sequenceAttr.value
5036
5097
  }
5037
5098
  };
5038
5099
  }
@@ -5082,7 +5143,7 @@ function _getBufferMap2() {
5082
5143
  return getGlobalSingleton("clientToMetricBufferMap", () => /* @__PURE__ */ new WeakMap());
5083
5144
  }
5084
5145
 
5085
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/timer.js
5146
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/timer.js
5086
5147
  function safeUnref(timer) {
5087
5148
  if (typeof timer === "object" && typeof timer.unref === "function") {
5088
5149
  timer.unref();
@@ -5090,7 +5151,7 @@ function safeUnref(timer) {
5090
5151
  return timer;
5091
5152
  }
5092
5153
 
5093
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/promisebuffer.js
5154
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/promisebuffer.js
5094
5155
  var SENTRY_BUFFER_FULL_ERROR = /* @__PURE__ */ Symbol.for("SentryBufferFullError");
5095
5156
  function makePromiseBuffer(limit = 100) {
5096
5157
  const buffer = /* @__PURE__ */ new Set();
@@ -5135,7 +5196,7 @@ function makePromiseBuffer(limit = 100) {
5135
5196
  };
5136
5197
  }
5137
5198
 
5138
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/ratelimit.js
5199
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/ratelimit.js
5139
5200
  var DEFAULT_RETRY_AFTER = 60 * 1e3;
5140
5201
  function parseRetryAfterHeader(header, now = safeDateNow()) {
5141
5202
  const headerDelay = parseInt(`${header}`, 10);
@@ -5187,7 +5248,7 @@ function updateRateLimits(limits, { statusCode, headers }, now = safeDateNow())
5187
5248
  return updatedRateLimits;
5188
5249
  }
5189
5250
 
5190
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/transports/base.js
5251
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/transports/base.js
5191
5252
  var DEFAULT_TRANSPORT_BUFFER_SIZE = 64;
5192
5253
  function createTransport(options, makeRequest, buffer = makePromiseBuffer(
5193
5254
  options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE
@@ -5257,7 +5318,7 @@ function createTransport(options, makeRequest, buffer = makePromiseBuffer(
5257
5318
  };
5258
5319
  }
5259
5320
 
5260
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/clientreport.js
5321
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/clientreport.js
5261
5322
  function createClientReportEnvelope(discarded_events, dsn, timestamp) {
5262
5323
  const clientReportItem = [
5263
5324
  { type: "client_report" },
@@ -5269,7 +5330,7 @@ function createClientReportEnvelope(discarded_events, dsn, timestamp) {
5269
5330
  return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);
5270
5331
  }
5271
5332
 
5272
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/eventUtils.js
5333
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/eventUtils.js
5273
5334
  function getPossibleEventMessages(event) {
5274
5335
  const possibleMessages = [];
5275
5336
  if (event.message) {
@@ -5288,7 +5349,7 @@ function getPossibleEventMessages(event) {
5288
5349
  return possibleMessages;
5289
5350
  }
5290
5351
 
5291
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/transactionEvent.js
5352
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/transactionEvent.js
5292
5353
  function convertTransactionEventToSpanJson(event) {
5293
5354
  const { trace_id, parent_span_id, span_id, status, origin, data, op } = event.contexts?.trace ?? {};
5294
5355
  return {
@@ -5333,7 +5394,7 @@ function convertSpanJsonToTransactionEvent(span) {
5333
5394
  };
5334
5395
  }
5335
5396
 
5336
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/client.js
5397
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/client.js
5337
5398
  var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
5338
5399
  var MISSING_RELEASE_FOR_SESSION_ERROR = "Discarded session because of missing or non-string release";
5339
5400
  var INTERNAL_ERROR_SYMBOL = /* @__PURE__ */ Symbol.for("SentryInternalError");
@@ -5886,7 +5947,7 @@ var Client = class {
5886
5947
  this.recordDroppedEvent("event_processor", dataCategory);
5887
5948
  throw _makeDoNotSendEventError("An event processor returned `null`, will not send event.");
5888
5949
  }
5889
- const isInternalException = hint.data && hint.data.__sentry__ === true;
5950
+ const isInternalException = hint.data?.__sentry__ === true;
5890
5951
  if (isInternalException) {
5891
5952
  return prepared;
5892
5953
  }
@@ -6130,7 +6191,7 @@ function estimatePrimitiveSizeInBytes(value) {
6130
6191
  return 0;
6131
6192
  }
6132
6193
 
6133
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/checkin.js
6194
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/checkin.js
6134
6195
  function createCheckInEnvelope(checkIn, dynamicSamplingContext, metadata, tunnel, dsn) {
6135
6196
  const headers = {
6136
6197
  sent_at: (/* @__PURE__ */ new Date()).toISOString()
@@ -6157,7 +6218,7 @@ function createCheckInEnvelopeItem(checkIn) {
6157
6218
  return [checkInHeaders, checkIn];
6158
6219
  }
6159
6220
 
6160
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/transports/userAgent.js
6221
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/transports/userAgent.js
6161
6222
  function addUserAgentToTransportHeaders(options) {
6162
6223
  const sdkMetadata = options._metadata?.sdk;
6163
6224
  const sdkUserAgent = sdkMetadata?.name && sdkMetadata?.version ? `${sdkMetadata?.name}/${sdkMetadata?.version}` : void 0;
@@ -6170,7 +6231,7 @@ function addUserAgentToTransportHeaders(options) {
6170
6231
  };
6171
6232
  }
6172
6233
 
6173
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/eventbuilder.js
6234
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/eventbuilder.js
6174
6235
  function parseStackFrames(stackParser, error3) {
6175
6236
  return stackParser(error3.stack || "", 1);
6176
6237
  }
@@ -6303,7 +6364,7 @@ function eventFromMessage(stackParser, message, level = "info", hint, attachStac
6303
6364
  return event;
6304
6365
  }
6305
6366
 
6306
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/server-runtime-client.js
6367
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/server-runtime-client.js
6307
6368
  var ServerRuntimeClient = class extends Client {
6308
6369
  /**
6309
6370
  * Creates a new Edge SDK instance.
@@ -6467,7 +6528,7 @@ function setCurrentRequestSessionErroredOrCrashed(eventHint) {
6467
6528
  }
6468
6529
  }
6469
6530
 
6470
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/sdk.js
6531
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/sdk.js
6471
6532
  function initAndBind(clientClass, options) {
6472
6533
  if (options.debug === true) {
6473
6534
  if (DEBUG_BUILD) {
@@ -6489,7 +6550,7 @@ function setCurrentClient(client) {
6489
6550
  getCurrentScope().setClient(client);
6490
6551
  }
6491
6552
 
6492
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/transports/offline.js
6553
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/transports/offline.js
6493
6554
  var MIN_DELAY = 100;
6494
6555
  var START_DELAY = 5e3;
6495
6556
  var MAX_DELAY = 36e5;
@@ -6594,7 +6655,7 @@ function makeOfflineTransport(createTransport2) {
6594
6655
  };
6595
6656
  }
6596
6657
 
6597
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/transports/multiplexed.js
6658
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/transports/multiplexed.js
6598
6659
  var MULTIPLEXED_TRANSPORT_EXTRA_KEY = "MULTIPLEXED_TRANSPORT_EXTRA_KEY";
6599
6660
  function eventFromEnvelope(env, types) {
6600
6661
  let event;
@@ -6685,7 +6746,7 @@ function makeMultiplexedTransport(createTransport2, matcher) {
6685
6746
  };
6686
6747
  }
6687
6748
 
6688
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/ai/providerSkip.js
6749
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/ai/providerSkip.js
6689
6750
  var SKIPPED_AI_PROVIDERS = /* @__PURE__ */ new Set();
6690
6751
  function _INTERNAL_skipAiProviderWrapping(modules) {
6691
6752
  modules.forEach((module2) => {
@@ -6701,7 +6762,7 @@ function _INTERNAL_clearAiProviderSkips() {
6701
6762
  DEBUG_BUILD && debug.log("Cleared AI provider skip registrations");
6702
6763
  }
6703
6764
 
6704
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/envToBool.js
6765
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/envToBool.js
6705
6766
  var FALSY_ENV_VALUES = /* @__PURE__ */ new Set(["false", "f", "n", "no", "off", "0"]);
6706
6767
  var TRUTHY_ENV_VALUES = /* @__PURE__ */ new Set(["true", "t", "y", "yes", "on", "1"]);
6707
6768
  function envToBool(value, options) {
@@ -6715,7 +6776,7 @@ function envToBool(value, options) {
6715
6776
  return options?.strict ? null : Boolean(value);
6716
6777
  }
6717
6778
 
6718
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/url.js
6779
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/url.js
6719
6780
  var DEFAULT_BASE_URL = "thismessage:/";
6720
6781
  function isURLObjectRelative(url) {
6721
6782
  return "isRelative" in url;
@@ -6848,7 +6909,7 @@ function stripDataUrlContent(url, includeDataPrefix = true) {
6848
6909
  return url;
6849
6910
  }
6850
6911
 
6851
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/isSentryRequestUrl.js
6912
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/isSentryRequestUrl.js
6852
6913
  function isSentryRequestUrl(url, client) {
6853
6914
  const dsn = client?.getDsn();
6854
6915
  const tunnel = client?.getOptions().tunnel;
@@ -6871,7 +6932,7 @@ function removeTrailingSlash(str) {
6871
6932
  return str[str.length - 1] === "/" ? str.slice(0, -1) : str;
6872
6933
  }
6873
6934
 
6874
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/parameterize.js
6935
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/parameterize.js
6875
6936
  function parameterize(strings, ...values) {
6876
6937
  const formatted = new String(String.raw(strings, ...values));
6877
6938
  formatted.__sentry_template_string__ = strings.join("\0").replace(/%/g, "%%").replace(/\0/g, "%s");
@@ -6880,7 +6941,7 @@ function parameterize(strings, ...values) {
6880
6941
  }
6881
6942
  var fmt = parameterize;
6882
6943
 
6883
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/tunnel.js
6944
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/tunnel.js
6884
6945
  async function handleTunnelRequest(options) {
6885
6946
  const { request, allowedDsns } = options;
6886
6947
  if (allowedDsns.length === 0) {
@@ -6925,7 +6986,7 @@ async function handleTunnelRequest(options) {
6925
6986
  }
6926
6987
  }
6927
6988
 
6928
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/ipAddress.js
6989
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/ipAddress.js
6929
6990
  function addAutoIpAddressToUser(objWithMaybeUser) {
6930
6991
  if (objWithMaybeUser.user?.ip_address === void 0) {
6931
6992
  objWithMaybeUser.user = {
@@ -6949,7 +7010,7 @@ function addAutoIpAddressToSession(session) {
6949
7010
  }
6950
7011
  }
6951
7012
 
6952
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/sdkMetadata.js
7013
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/sdkMetadata.js
6953
7014
  function applySdkMetadata(options, name, names = [name], source = "npm") {
6954
7015
  const sdk = (options._metadata = options._metadata || {}).sdk = options._metadata.sdk || {};
6955
7016
  if (!sdk.name) {
@@ -6962,7 +7023,7 @@ function applySdkMetadata(options, name, names = [name], source = "npm") {
6962
7023
  }
6963
7024
  }
6964
7025
 
6965
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/traceData.js
7026
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/traceData.js
6966
7027
  function getTraceData(options = {}) {
6967
7028
  const client = options.client || getClient();
6968
7029
  if (!isEnabled2() || !client) {
@@ -6975,6 +7036,9 @@ function getTraceData(options = {}) {
6975
7036
  }
6976
7037
  const scope = options.scope || getCurrentScope();
6977
7038
  const span = options.span || getActiveSpan();
7039
+ if (!span && hasExternalPropagationContext()) {
7040
+ return {};
7041
+ }
6978
7042
  const sentryTrace = span ? spanToTraceHeader(span) : scopeToTraceHeader(scope);
6979
7043
  const dsc = span ? getDynamicSamplingContextFromSpan(span) : getDynamicSamplingContextFromScope(client, scope);
6980
7044
  const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc);
@@ -7001,7 +7065,7 @@ function scopeToTraceparentHeader(scope) {
7001
7065
  return generateTraceparentHeader(traceId, propagationSpanId, sampled);
7002
7066
  }
7003
7067
 
7004
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/tracePropagationTargets.js
7068
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/tracePropagationTargets.js
7005
7069
  var NOT_PROPAGATED_MESSAGE = "[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:";
7006
7070
  function shouldPropagateTraceForUrl(url, tracePropagationTargets, decisionMap) {
7007
7071
  if (typeof url !== "string" || !tracePropagationTargets) {
@@ -7018,12 +7082,12 @@ function shouldPropagateTraceForUrl(url, tracePropagationTargets, decisionMap) {
7018
7082
  return decision;
7019
7083
  }
7020
7084
 
7021
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/meta.js
7085
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/meta.js
7022
7086
  function getTraceMetaTags(traceData) {
7023
7087
  return Object.entries(traceData || getTraceData()).map(([key, value]) => `<meta name="${key}" content="${value}"/>`).join("\n");
7024
7088
  }
7025
7089
 
7026
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/debounce.js
7090
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/debounce.js
7027
7091
  function debounce(func, wait, options) {
7028
7092
  let callbackReturnValue;
7029
7093
  let timerId;
@@ -7061,7 +7125,7 @@ function debounce(func, wait, options) {
7061
7125
  return debounced;
7062
7126
  }
7063
7127
 
7064
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/request.js
7128
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/request.js
7065
7129
  function winterCGHeadersToDict(winterCGHeaders) {
7066
7130
  const headers = {};
7067
7131
  try {
@@ -7154,7 +7218,7 @@ var SENSITIVE_HEADER_SNIPPETS = [
7154
7218
  "cookie"
7155
7219
  ];
7156
7220
  var PII_HEADER_SNIPPETS = ["x-forwarded-", "-user"];
7157
- function httpHeadersToSpanAttributes(headers, sendDefaultPii = false) {
7221
+ function httpHeadersToSpanAttributes(headers, sendDefaultPii = false, lifecycle = "request") {
7158
7222
  const spanAttributes = {};
7159
7223
  try {
7160
7224
  Object.entries(headers).forEach(([key, value]) => {
@@ -7173,10 +7237,17 @@ function httpHeadersToSpanAttributes(headers, sendDefaultPii = false) {
7173
7237
  const cookieKey = equalSignIndex !== -1 ? cookie.substring(0, equalSignIndex) : cookie;
7174
7238
  const cookieValue = equalSignIndex !== -1 ? cookie.substring(equalSignIndex + 1) : "";
7175
7239
  const lowerCasedCookieKey = cookieKey.toLowerCase();
7176
- addSpanAttribute(spanAttributes, lowerCasedHeaderKey, lowerCasedCookieKey, cookieValue, sendDefaultPii);
7240
+ addSpanAttribute(
7241
+ spanAttributes,
7242
+ lowerCasedHeaderKey,
7243
+ lowerCasedCookieKey,
7244
+ cookieValue,
7245
+ sendDefaultPii,
7246
+ lifecycle
7247
+ );
7177
7248
  }
7178
7249
  } else {
7179
- addSpanAttribute(spanAttributes, lowerCasedHeaderKey, "", value, sendDefaultPii);
7250
+ addSpanAttribute(spanAttributes, lowerCasedHeaderKey, "", value, sendDefaultPii, lifecycle);
7180
7251
  }
7181
7252
  });
7182
7253
  } catch {
@@ -7186,12 +7257,13 @@ function httpHeadersToSpanAttributes(headers, sendDefaultPii = false) {
7186
7257
  function normalizeAttributeKey(key) {
7187
7258
  return key.replace(/-/g, "_");
7188
7259
  }
7189
- function addSpanAttribute(spanAttributes, headerKey, cookieKey, value, sendPii) {
7190
- const normalizedKey = cookieKey ? `http.request.header.${normalizeAttributeKey(headerKey)}.${normalizeAttributeKey(cookieKey)}` : `http.request.header.${normalizeAttributeKey(headerKey)}`;
7260
+ function addSpanAttribute(spanAttributes, headerKey, cookieKey, value, sendPii, lifecycle) {
7191
7261
  const headerValue = handleHttpHeader(cookieKey || headerKey, value, sendPii);
7192
- if (headerValue !== void 0) {
7193
- spanAttributes[normalizedKey] = headerValue;
7262
+ if (headerValue == null) {
7263
+ return;
7194
7264
  }
7265
+ const normalizedKey = `http.${lifecycle}.header.${normalizeAttributeKey(headerKey)}${cookieKey ? `.${normalizeAttributeKey(cookieKey)}` : ""}`;
7266
+ spanAttributes[normalizedKey] = headerValue;
7195
7267
  }
7196
7268
  function handleHttpHeader(lowerCasedKey, value, sendPii) {
7197
7269
  const isSensitive = sendPii ? SENSITIVE_HEADER_SNIPPETS.some((snippet) => lowerCasedKey.includes(snippet)) : [...PII_HEADER_SNIPPETS, ...SENSITIVE_HEADER_SNIPPETS].some((snippet) => lowerCasedKey.includes(snippet));
@@ -7216,7 +7288,7 @@ function extractQueryParamsFromUrl(url) {
7216
7288
  }
7217
7289
  }
7218
7290
 
7219
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/breadcrumbs.js
7291
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/breadcrumbs.js
7220
7292
  var DEFAULT_BREADCRUMBS = 100;
7221
7293
  function addBreadcrumb(breadcrumb, hint) {
7222
7294
  const client = getClient();
@@ -7234,7 +7306,7 @@ function addBreadcrumb(breadcrumb, hint) {
7234
7306
  isolationScope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
7235
7307
  }
7236
7308
 
7237
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/functiontostring.js
7309
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/functiontostring.js
7238
7310
  var originalFunctionToString;
7239
7311
  var INTEGRATION_NAME = "FunctionToString";
7240
7312
  var SETUP_CLIENTS = /* @__PURE__ */ new WeakMap();
@@ -7259,7 +7331,7 @@ var _functionToStringIntegration = (() => {
7259
7331
  });
7260
7332
  var functionToStringIntegration = defineIntegration(_functionToStringIntegration);
7261
7333
 
7262
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/eventFilters.js
7334
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/eventFilters.js
7263
7335
  var DEFAULT_IGNORE_ERRORS = [
7264
7336
  /^Script error\.?$/,
7265
7337
  /^Javascript error: Script error\.? on line 0$/,
@@ -7271,13 +7343,13 @@ var DEFAULT_IGNORE_ERRORS = [
7271
7343
  // Error from Google Search App https://issuetracker.google.com/issues/396043331
7272
7344
  /^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,
7273
7345
  // Random error that happens but not actionable or noticeable to end-users.
7274
- `can't redefine non-configurable property "solana"`,
7346
+ /can't redefine non-configurable property "solana"/,
7275
7347
  // Probably a browser extension or custom browser (Brave) throwing this error
7276
- "vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)",
7348
+ /vv\(\)\.getRestrictions is not a function/,
7277
7349
  // Error thrown by GTM, seemingly not affecting end-users
7278
- "Can't find variable: _AutofillCallbackHandler",
7350
+ /Can't find variable: _AutofillCallbackHandler/,
7279
7351
  // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/
7280
- /^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,
7352
+ /Object Not Found Matching Id:\d+, MethodName:simulateEvent/,
7281
7353
  // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
7282
7354
  /^Java exception was raised during method invocation$/
7283
7355
  // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
@@ -7424,7 +7496,7 @@ function _isUselessError(event) {
7424
7496
  );
7425
7497
  }
7426
7498
 
7427
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/aggregate-errors.js
7499
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/aggregate-errors.js
7428
7500
  function applyAggregateErrorsToEvent(exceptionFromErrorImplementation, parser, key, limit, event, hint) {
7429
7501
  if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) {
7430
7502
  return;
@@ -7509,7 +7581,7 @@ function applyExceptionGroupFieldsForChildException(exception, source, exception
7509
7581
  };
7510
7582
  }
7511
7583
 
7512
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/linkederrors.js
7584
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/linkederrors.js
7513
7585
  var DEFAULT_KEY = "cause";
7514
7586
  var DEFAULT_LIMIT = 5;
7515
7587
  var INTEGRATION_NAME3 = "LinkedErrors";
@@ -7526,7 +7598,7 @@ var _linkedErrorsIntegration = ((options = {}) => {
7526
7598
  });
7527
7599
  var linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);
7528
7600
 
7529
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/metadata.js
7601
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/metadata.js
7530
7602
  var filenameMetadataMap = /* @__PURE__ */ new Map();
7531
7603
  var parsedStacks = /* @__PURE__ */ new Set();
7532
7604
  function getFilenameToMetadataMap(parser) {
@@ -7590,7 +7662,7 @@ function stripMetadataFromStackFrames(event) {
7590
7662
  });
7591
7663
  }
7592
7664
 
7593
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/moduleMetadata.js
7665
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/moduleMetadata.js
7594
7666
  var moduleMetadataIntegration = defineIntegration(() => {
7595
7667
  return {
7596
7668
  name: "ModuleMetadata",
@@ -7617,7 +7689,7 @@ var moduleMetadataIntegration = defineIntegration(() => {
7617
7689
  };
7618
7690
  });
7619
7691
 
7620
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/cookie.js
7692
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/cookie.js
7621
7693
  function parseCookie(str) {
7622
7694
  const obj = {};
7623
7695
  let index = 0;
@@ -7650,7 +7722,7 @@ function parseCookie(str) {
7650
7722
  return obj;
7651
7723
  }
7652
7724
 
7653
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/vendor/getIpAddress.js
7725
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/vendor/getIpAddress.js
7654
7726
  var ipHeaderNames = [
7655
7727
  "X-Client-IP",
7656
7728
  "X-Forwarded-For",
@@ -7703,7 +7775,7 @@ function isIP(str) {
7703
7775
  return regex.test(str);
7704
7776
  }
7705
7777
 
7706
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/requestdata.js
7778
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/requestdata.js
7707
7779
  var DEFAULT_INCLUDE = {
7708
7780
  cookies: true,
7709
7781
  data: true,
@@ -7780,7 +7852,7 @@ function extractNormalizedRequestData(normalizedRequest, include) {
7780
7852
  return requestData;
7781
7853
  }
7782
7854
 
7783
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/instrument/console.js
7855
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/instrument/console.js
7784
7856
  function addConsoleInstrumentationHandler(handler) {
7785
7857
  const type = "console";
7786
7858
  addHandler(type, handler);
@@ -7806,12 +7878,12 @@ function instrumentConsole() {
7806
7878
  });
7807
7879
  }
7808
7880
 
7809
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/severity.js
7881
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/severity.js
7810
7882
  function severityLevelFromString(level) {
7811
7883
  return level === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(level) ? level : "log";
7812
7884
  }
7813
7885
 
7814
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/captureconsole.js
7886
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/captureconsole.js
7815
7887
  var INTEGRATION_NAME5 = "CaptureConsole";
7816
7888
  var _captureConsoleIntegration = ((options = {}) => {
7817
7889
  const levels = options.levels || CONSOLE_LEVELS;
@@ -7868,7 +7940,7 @@ function consoleHandler(args, level, handled) {
7868
7940
  });
7869
7941
  }
7870
7942
 
7871
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/dedupe.js
7943
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/dedupe.js
7872
7944
  var INTEGRATION_NAME6 = "Dedupe";
7873
7945
  var _dedupeIntegration = (() => {
7874
7946
  let previousEvent;
@@ -7983,7 +8055,7 @@ function _getExceptionFromEvent(event) {
7983
8055
  return event.exception?.values?.[0];
7984
8056
  }
7985
8057
 
7986
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/extraerrordata.js
8058
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/extraerrordata.js
7987
8059
  var INTEGRATION_NAME7 = "ExtraErrorData";
7988
8060
  var _extraErrorDataIntegration = ((options = {}) => {
7989
8061
  const { depth = 3, captureErrorCause = true } = options;
@@ -8061,7 +8133,7 @@ function _extractErrorData(error3, captureErrorCause, maxValueLength) {
8061
8133
  return null;
8062
8134
  }
8063
8135
 
8064
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/path.js
8136
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/path.js
8065
8137
  function normalizeArray(parts, allowAboveRoot) {
8066
8138
  let up = 0;
8067
8139
  for (let i = parts.length - 1; i >= 0; i--) {
@@ -8185,7 +8257,7 @@ function basename(path, ext) {
8185
8257
  return f;
8186
8258
  }
8187
8259
 
8188
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/rewriteframes.js
8260
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/rewriteframes.js
8189
8261
  var INTEGRATION_NAME8 = "RewriteFrames";
8190
8262
  var rewriteFramesIntegration = defineIntegration((options = {}) => {
8191
8263
  const root = options.root;
@@ -8257,7 +8329,7 @@ function generateIteratee({
8257
8329
  };
8258
8330
  }
8259
8331
 
8260
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/supabase.js
8332
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/supabase.js
8261
8333
  var AUTH_OPERATIONS_TO_INSTRUMENT = [
8262
8334
  "reauthenticate",
8263
8335
  "signInAnonymously",
@@ -8517,7 +8589,7 @@ function instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder) {
8517
8589
  }
8518
8590
  span.end();
8519
8591
  }
8520
- if (res.error) {
8592
+ if (res?.error) {
8521
8593
  const err = new Error(res.error.message);
8522
8594
  if (res.error.code) {
8523
8595
  err.code = res.error.code;
@@ -8619,7 +8691,7 @@ var supabaseIntegration = defineIntegration((options) => {
8619
8691
  return _supabaseIntegration(options.supabaseClient);
8620
8692
  });
8621
8693
 
8622
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/postgresjs.js
8694
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/postgresjs.js
8623
8695
  var SQL_OPERATION_REGEX = /^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i;
8624
8696
  var CONNECTION_CONTEXT_SYMBOL = /* @__PURE__ */ Symbol("sentryPostgresConnectionContext");
8625
8697
  var INSTRUMENTED_MARKER = /* @__PURE__ */ Symbol.for("sentry.instrumented.postgresjs");
@@ -8837,7 +8909,7 @@ function _attachConnectionContext(sql, proxiedSql) {
8837
8909
  proxiedSql[CONNECTION_CONTEXT_SYMBOL] = connectionContext;
8838
8910
  }
8839
8911
 
8840
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/zoderrors.js
8912
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/zoderrors.js
8841
8913
  var DEFAULT_LIMIT2 = 10;
8842
8914
  var INTEGRATION_NAME10 = "ZodErrors";
8843
8915
  function originalExceptionIsZodError(originalException) {
@@ -8942,7 +9014,7 @@ var _zodErrorsIntegration = ((options = {}) => {
8942
9014
  });
8943
9015
  var zodErrorsIntegration = defineIntegration(_zodErrorsIntegration);
8944
9016
 
8945
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/third-party-errors-filter.js
9017
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/third-party-errors-filter.js
8946
9018
  var thirdPartyErrorFilterIntegration = defineIntegration((options) => {
8947
9019
  return {
8948
9020
  name: "ThirdPartyErrorsFilter",
@@ -9029,7 +9101,7 @@ var BUNDLER_PLUGIN_APP_KEY_PREFIX = "_sentryBundlerPluginAppKey:";
9029
9101
  var SENTRY_INTERNAL_COMMENT = "Attempt to invoke user-land function";
9030
9102
  var SENTRY_INTERNAL_FN_APPLY = "fn.apply(this, wrappedArguments)";
9031
9103
 
9032
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/console.js
9104
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/console.js
9033
9105
  var INTEGRATION_NAME11 = "Console";
9034
9106
  var consoleIntegration = defineIntegration((options = {}) => {
9035
9107
  const levels = new Set(options.levels || CONSOLE_LEVELS);
@@ -9073,7 +9145,7 @@ function formatConsoleArgs(values) {
9073
9145
  return "util" in GLOBAL_OBJ && typeof GLOBAL_OBJ.util.format === "function" ? GLOBAL_OBJ.util.format(...values) : safeJoin(values, " ");
9074
9146
  }
9075
9147
 
9076
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/featureFlags.js
9148
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/featureFlags.js
9077
9149
  var _INTERNAL_FLAG_BUFFER_SIZE = 100;
9078
9150
  var _INTERNAL_MAX_FLAGS_PER_SPAN = 10;
9079
9151
  var SPAN_FLAG_ATTRIBUTE_PREFIX = "flag.evaluation.";
@@ -9137,7 +9209,7 @@ function _INTERNAL_addFeatureFlagToActiveSpan(name, value, maxFlagsPerSpan = _IN
9137
9209
  }
9138
9210
  }
9139
9211
 
9140
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/featureFlags/featureFlagsIntegration.js
9212
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/featureFlags/featureFlagsIntegration.js
9141
9213
  var featureFlagsIntegration = defineIntegration(() => {
9142
9214
  return {
9143
9215
  name: "FeatureFlags",
@@ -9151,7 +9223,7 @@ var featureFlagsIntegration = defineIntegration(() => {
9151
9223
  };
9152
9224
  });
9153
9225
 
9154
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/featureFlags/growthbook.js
9226
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/featureFlags/growthbook.js
9155
9227
  var growthbookIntegration = defineIntegration(
9156
9228
  ({ growthbookClass }) => {
9157
9229
  return {
@@ -9183,7 +9255,7 @@ function _wrapAndCaptureBooleanResult(original) {
9183
9255
  };
9184
9256
  }
9185
9257
 
9186
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/conversationId.js
9258
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/conversationId.js
9187
9259
  var INTEGRATION_NAME12 = "ConversationId";
9188
9260
  var _conversationIdIntegration = (() => {
9189
9261
  return {
@@ -9202,7 +9274,7 @@ var _conversationIdIntegration = (() => {
9202
9274
  });
9203
9275
  var conversationIdIntegration = defineIntegration(_conversationIdIntegration);
9204
9276
 
9205
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/profiling.js
9277
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/profiling.js
9206
9278
  function isProfilingIntegrationWithProfiler(integration) {
9207
9279
  return !!integration && typeof integration["_profiler"] !== "undefined" && typeof integration["_profiler"]["start"] === "function" && typeof integration["_profiler"]["stop"] === "function";
9208
9280
  }
@@ -9245,7 +9317,7 @@ var profiler = {
9245
9317
  stopProfiler
9246
9318
  };
9247
9319
 
9248
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/fetch.js
9320
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/fetch.js
9249
9321
  function instrumentFetchRequest(handlerData, shouldCreateSpan, shouldAttachHeaders, spans, spanOriginOrOptions) {
9250
9322
  if (!handlerData.fetchData) {
9251
9323
  return void 0;
@@ -9428,7 +9500,7 @@ function getFetchSpanAttributes(url, parsedUrl, method, spanOrigin) {
9428
9500
  return attributes;
9429
9501
  }
9430
9502
 
9431
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/trpc.js
9503
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/trpc.js
9432
9504
  var trpcCaptureContext = { mechanism: { handled: false, type: "auto.rpc.trpc.middleware" } };
9433
9505
  function captureIfError(nextResult) {
9434
9506
  if (typeof nextResult === "object" && nextResult !== null && "ok" in nextResult && !nextResult.ok && "error" in nextResult) {
@@ -9492,7 +9564,7 @@ function trpcMiddleware(options = {}) {
9492
9564
  };
9493
9565
  }
9494
9566
 
9495
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/errorCapture.js
9567
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/errorCapture.js
9496
9568
  function captureError(error3, errorType, extraData) {
9497
9569
  try {
9498
9570
  const client = getClient();
@@ -9520,7 +9592,7 @@ function captureError(error3, errorType, extraData) {
9520
9592
  }
9521
9593
  }
9522
9594
 
9523
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/handlers.js
9595
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/handlers.js
9524
9596
  function wrapMethodHandler(serverInstance, methodName) {
9525
9597
  fill(serverInstance, methodName, (originalMethod) => {
9526
9598
  return function(name, ...args) {
@@ -9577,7 +9649,7 @@ function captureHandlerError(error3, methodName, handlerName) {
9577
9649
  extraData.prompt_name = handlerName;
9578
9650
  captureError(error3, "prompt_execution", extraData);
9579
9651
  }
9580
- } catch (captureErr) {
9652
+ } catch (_captureErr) {
9581
9653
  }
9582
9654
  }
9583
9655
  function wrapToolHandlers(serverInstance) {
@@ -9595,7 +9667,7 @@ function wrapAllMCPHandlers(serverInstance) {
9595
9667
  wrapPromptHandlers(serverInstance);
9596
9668
  }
9597
9669
 
9598
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/attributes.js
9670
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/attributes.js
9599
9671
  var MCP_METHOD_NAME_ATTRIBUTE = "mcp.method.name";
9600
9672
  var MCP_REQUEST_ID_ATTRIBUTE = "mcp.request.id";
9601
9673
  var MCP_SESSION_ID_ATTRIBUTE = "mcp.session.id";
@@ -9627,7 +9699,7 @@ var MCP_FUNCTION_ORIGIN_VALUE = "auto.function.mcp_server";
9627
9699
  var MCP_NOTIFICATION_ORIGIN_VALUE = "auto.mcp.notification";
9628
9700
  var MCP_ROUTE_SOURCE_VALUE = "route";
9629
9701
 
9630
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/validation.js
9702
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/validation.js
9631
9703
  function isJsonRpcRequest(message) {
9632
9704
  return typeof message === "object" && message !== null && "jsonrpc" in message && message.jsonrpc === "2.0" && "method" in message && "id" in message;
9633
9705
  }
@@ -9648,7 +9720,7 @@ function isValidContentItem(item) {
9648
9720
  return item != null && typeof item === "object";
9649
9721
  }
9650
9722
 
9651
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/resultExtraction.js
9723
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/resultExtraction.js
9652
9724
  function buildAllContentItemAttributes(content, includeContent) {
9653
9725
  const attributes = {
9654
9726
  [MCP_TOOL_RESULT_CONTENT_COUNT_ATTRIBUTE]: content.length
@@ -9732,7 +9804,7 @@ function extractPromptResultAttributes(result, recordOutputs) {
9732
9804
  return attributes;
9733
9805
  }
9734
9806
 
9735
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/sessionManagement.js
9807
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/sessionManagement.js
9736
9808
  var sessionToSessionData = /* @__PURE__ */ new Map();
9737
9809
  var statelessSessionData = /* @__PURE__ */ new WeakMap();
9738
9810
  function getSessionData(transport) {
@@ -9773,7 +9845,7 @@ function cleanupSessionDataForTransport(transport) {
9773
9845
  }
9774
9846
  }
9775
9847
 
9776
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/sessionExtraction.js
9848
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/sessionExtraction.js
9777
9849
  function extractPartyInfo(obj) {
9778
9850
  const partyInfo = {};
9779
9851
  if (isValidContentItem(obj)) {
@@ -9911,7 +9983,7 @@ function buildTransportAttributes(transport, extra) {
9911
9983
  return attributes;
9912
9984
  }
9913
9985
 
9914
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/correlation.js
9986
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/correlation.js
9915
9987
  var sessionToSpanMap = /* @__PURE__ */ new Map();
9916
9988
  var statelessSpanMap = /* @__PURE__ */ new WeakMap();
9917
9989
  function getOrCreateSpanMap(transport) {
@@ -9995,7 +10067,7 @@ function cleanupPendingSpansForTransport(transport) {
9995
10067
  }
9996
10068
  }
9997
10069
 
9998
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/methodConfig.js
10070
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/methodConfig.js
9999
10071
  var METHOD_CONFIGS = {
10000
10072
  "tools/call": {
10001
10073
  targetField: "name",
@@ -10058,7 +10130,7 @@ function getRequestArguments(method, params) {
10058
10130
  return args;
10059
10131
  }
10060
10132
 
10061
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/attributeExtraction.js
10133
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/attributeExtraction.js
10062
10134
  function formatLoggingData(data) {
10063
10135
  return typeof data === "string" ? data : JSON.stringify(data);
10064
10136
  }
@@ -10133,7 +10205,7 @@ function buildTypeSpecificAttributes(type, message, params, recordInputs) {
10133
10205
  return getNotificationAttributes(message.method, params || {}, recordInputs);
10134
10206
  }
10135
10207
 
10136
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/piiFiltering.js
10208
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/piiFiltering.js
10137
10209
  var NETWORK_PII_ATTRIBUTES = /* @__PURE__ */ new Set([CLIENT_ADDRESS_ATTRIBUTE, CLIENT_PORT_ATTRIBUTE, MCP_RESOURCE_URI_ATTRIBUTE]);
10138
10210
  function isNetworkPiiAttribute(key) {
10139
10211
  return NETWORK_PII_ATTRIBUTES.has(key);
@@ -10153,7 +10225,7 @@ function filterMcpPiiFromSpanData(spanData, sendDefaultPii) {
10153
10225
  );
10154
10226
  }
10155
10227
 
10156
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/spans.js
10228
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/spans.js
10157
10229
  function createSpanName(method, target) {
10158
10230
  return target ? `${method} ${target}` : method;
10159
10231
  }
@@ -10250,7 +10322,7 @@ function buildMcpServerSpanConfig(jsonRpcMessage, transport, extra, options) {
10250
10322
  };
10251
10323
  }
10252
10324
 
10253
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/transport.js
10325
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/transport.js
10254
10326
  function wrapTransportOnMessage(transport, options) {
10255
10327
  if (transport.onmessage) {
10256
10328
  fill(transport, "onmessage", (originalOnMessage) => {
@@ -10367,7 +10439,7 @@ function captureTransportError(error3) {
10367
10439
  }
10368
10440
  }
10369
10441
 
10370
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/index.js
10442
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/mcp-server/index.js
10371
10443
  var wrappedMcpServerInstances = /* @__PURE__ */ new WeakSet();
10372
10444
  function wrapMcpServerWithSentry(mcpServerInstance, options) {
10373
10445
  if (wrappedMcpServerInstances.has(mcpServerInstance)) {
@@ -10402,7 +10474,7 @@ function wrapMcpServerWithSentry(mcpServerInstance, options) {
10402
10474
  return mcpServerInstance;
10403
10475
  }
10404
10476
 
10405
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/feedback.js
10477
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/feedback.js
10406
10478
  function captureFeedback(params, hint = {}, scope = getCurrentScope()) {
10407
10479
  const { message, name, email, url, source, associatedEventId, tags } = params;
10408
10480
  const feedbackEvent = {
@@ -10428,7 +10500,7 @@ function captureFeedback(params, hint = {}, scope = getCurrentScope()) {
10428
10500
  return eventId;
10429
10501
  }
10430
10502
 
10431
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/logs/public-api.js
10503
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/logs/public-api.js
10432
10504
  var public_api_exports = {};
10433
10505
  __export(public_api_exports, {
10434
10506
  debug: () => debug2,
@@ -10461,7 +10533,7 @@ function fatal(message, attributes, { scope } = {}) {
10461
10533
  captureLog("fatal", message, attributes, scope);
10462
10534
  }
10463
10535
 
10464
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/logs/utils.js
10536
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/logs/utils.js
10465
10537
  function formatConsoleArgs2(values, normalizeDepth, normalizeMaxBreadth) {
10466
10538
  return "util" in GLOBAL_OBJ && typeof GLOBAL_OBJ.util.format === "function" ? GLOBAL_OBJ.util.format(...values) : safeJoinConsoleArgs(values, normalizeDepth, normalizeMaxBreadth);
10467
10539
  }
@@ -10483,7 +10555,7 @@ function createConsoleTemplateAttributes(firstArg, followingArgs) {
10483
10555
  return attributes;
10484
10556
  }
10485
10557
 
10486
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/logs/console-integration.js
10558
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/logs/console-integration.js
10487
10559
  var INTEGRATION_NAME13 = "ConsoleLogs";
10488
10560
  var DEFAULT_ATTRIBUTES = {
10489
10561
  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.log.console"
@@ -10529,7 +10601,7 @@ var _consoleLoggingIntegration = ((options = {}) => {
10529
10601
  });
10530
10602
  var consoleLoggingIntegration = defineIntegration(_consoleLoggingIntegration);
10531
10603
 
10532
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/metrics/public-api.js
10604
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/metrics/public-api.js
10533
10605
  var public_api_exports2 = {};
10534
10606
  __export(public_api_exports2, {
10535
10607
  count: () => count,
@@ -10552,7 +10624,7 @@ function distribution(name, value, options) {
10552
10624
  captureMetric("distribution", name, value, options);
10553
10625
  }
10554
10626
 
10555
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/integrations/consola.js
10627
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/integrations/consola.js
10556
10628
  var DEFAULT_CAPTURED_LEVELS = ["trace", "debug", "info", "warn", "error", "fatal"];
10557
10629
  function createConsolaReporter(options = {}) {
10558
10630
  const levels = new Set(options.levels ?? DEFAULT_CAPTURED_LEVELS);
@@ -10702,7 +10774,7 @@ function processExtractedAttributes(extractionResult, normalizeDepth, normalizeM
10702
10774
  };
10703
10775
  }
10704
10776
 
10705
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/ai/gen-ai-attributes.js
10777
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/ai/gen-ai-attributes.js
10706
10778
  var GEN_AI_PROMPT_ATTRIBUTE = "gen_ai.prompt";
10707
10779
  var GEN_AI_SYSTEM_ATTRIBUTE = "gen_ai.system";
10708
10780
  var GEN_AI_REQUEST_MODEL_ATTRIBUTE = "gen_ai.request.model";
@@ -10725,6 +10797,7 @@ var GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE = "gen_ai.usage.total_tokens";
10725
10797
  var GEN_AI_OPERATION_NAME_ATTRIBUTE = "gen_ai.operation.name";
10726
10798
  var GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE = "sentry.sdk_meta.gen_ai.input.messages.original_length";
10727
10799
  var GEN_AI_INPUT_MESSAGES_ATTRIBUTE = "gen_ai.input.messages";
10800
+ var GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE = "gen_ai.output.messages";
10728
10801
  var GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE = "gen_ai.system_instructions";
10729
10802
  var GEN_AI_RESPONSE_TEXT_ATTRIBUTE = "gen_ai.response.text";
10730
10803
  var GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE = "gen_ai.request.available_tools";
@@ -10743,8 +10816,8 @@ var GEN_AI_STREAM_TEXT_DO_STREAM_OPERATION_ATTRIBUTE = "gen_ai.stream_text";
10743
10816
  var GEN_AI_GENERATE_OBJECT_DO_GENERATE_OPERATION_ATTRIBUTE = "gen_ai.generate_object";
10744
10817
  var GEN_AI_STREAM_OBJECT_DO_STREAM_OPERATION_ATTRIBUTE = "gen_ai.stream_object";
10745
10818
  var GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE = "gen_ai.embeddings.input";
10746
- var GEN_AI_EMBED_DO_EMBED_OPERATION_ATTRIBUTE = "gen_ai.embed";
10747
- var GEN_AI_EMBED_MANY_DO_EMBED_OPERATION_ATTRIBUTE = "gen_ai.embed_many";
10819
+ var GEN_AI_EMBED_DO_EMBED_OPERATION_ATTRIBUTE = "gen_ai.embeddings";
10820
+ var GEN_AI_EMBED_MANY_DO_EMBED_OPERATION_ATTRIBUTE = "gen_ai.embeddings";
10748
10821
  var GEN_AI_RERANK_DO_RERANK_OPERATION_ATTRIBUTE = "gen_ai.rerank";
10749
10822
  var GEN_AI_EXECUTE_TOOL_OPERATION_ATTRIBUTE = "gen_ai.execute_tool";
10750
10823
  var GEN_AI_TOOL_NAME_ATTRIBUTE = "gen_ai.tool.name";
@@ -10752,28 +10825,17 @@ var GEN_AI_TOOL_CALL_ID_ATTRIBUTE = "gen_ai.tool.call.id";
10752
10825
  var GEN_AI_TOOL_TYPE_ATTRIBUTE = "gen_ai.tool.type";
10753
10826
  var GEN_AI_TOOL_INPUT_ATTRIBUTE = "gen_ai.tool.input";
10754
10827
  var GEN_AI_TOOL_OUTPUT_ATTRIBUTE = "gen_ai.tool.output";
10828
+ var GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE = "gen_ai.tool.description";
10755
10829
  var OPENAI_RESPONSE_ID_ATTRIBUTE = "openai.response.id";
10756
10830
  var OPENAI_RESPONSE_MODEL_ATTRIBUTE = "openai.response.model";
10757
10831
  var OPENAI_RESPONSE_TIMESTAMP_ATTRIBUTE = "openai.response.timestamp";
10758
10832
  var OPENAI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = "openai.usage.completion_tokens";
10759
10833
  var OPENAI_USAGE_PROMPT_TOKENS_ATTRIBUTE = "openai.usage.prompt_tokens";
10760
- var OPENAI_OPERATIONS = {
10761
- CHAT: "chat",
10762
- EMBEDDINGS: "embeddings"
10763
- };
10764
10834
  var ANTHROPIC_AI_RESPONSE_TIMESTAMP_ATTRIBUTE = "anthropic.response.timestamp";
10765
10835
 
10766
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/constants.js
10836
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/constants.js
10767
10837
  var toolCallSpanContextMap = /* @__PURE__ */ new Map();
10768
- var INVOKE_AGENT_OPS = /* @__PURE__ */ new Set([
10769
- "ai.generateText",
10770
- "ai.streamText",
10771
- "ai.generateObject",
10772
- "ai.streamObject",
10773
- "ai.embed",
10774
- "ai.embedMany",
10775
- "ai.rerank"
10776
- ]);
10838
+ var INVOKE_AGENT_OPS = /* @__PURE__ */ new Set(["ai.generateText", "ai.streamText", "ai.generateObject", "ai.streamObject"]);
10777
10839
  var GENERATE_CONTENT_OPS = /* @__PURE__ */ new Set([
10778
10840
  "ai.generateText.doGenerate",
10779
10841
  "ai.streamText.doStream",
@@ -10783,15 +10845,15 @@ var GENERATE_CONTENT_OPS = /* @__PURE__ */ new Set([
10783
10845
  var EMBEDDINGS_OPS = /* @__PURE__ */ new Set(["ai.embed.doEmbed", "ai.embedMany.doEmbed"]);
10784
10846
  var RERANK_OPS = /* @__PURE__ */ new Set(["ai.rerank.doRerank"]);
10785
10847
  var DO_SPAN_NAME_PREFIX = {
10786
- "ai.embed.doEmbed": "embed",
10787
- "ai.embedMany.doEmbed": "embed_many",
10848
+ "ai.embed.doEmbed": "embeddings",
10849
+ "ai.embedMany.doEmbed": "embeddings",
10788
10850
  "ai.rerank.doRerank": "rerank"
10789
10851
  };
10790
10852
 
10791
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/ai/mediaStripping.js
10853
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/ai/mediaStripping.js
10792
10854
  function isContentMedia(part) {
10793
10855
  if (!part || typeof part !== "object") return false;
10794
- return isContentMediaSource(part) || hasInlineData(part) || hasImageUrl(part) || hasInputAudio(part) || hasFileData(part) || hasMediaTypeData(part) || hasBlobOrBase64Type(part) || hasB64Json(part) || hasImageGenerationResult(part) || hasDataUri(part);
10856
+ return isContentMediaSource(part) || hasInlineData(part) || hasImageUrl(part) || hasInputAudio(part) || hasFileData(part) || hasMediaTypeData(part) || hasVercelFileData(part) || hasVercelImageData(part) || hasBlobOrBase64Type(part) || hasB64Json(part) || hasImageGenerationResult(part) || hasDataUri(part);
10795
10857
  }
10796
10858
  function hasImageUrl(part) {
10797
10859
  if (!("image_url" in part)) return false;
@@ -10816,6 +10878,14 @@ function hasFileData(part) {
10816
10878
  function hasMediaTypeData(part) {
10817
10879
  return "media_type" in part && typeof part.media_type === "string" && "data" in part;
10818
10880
  }
10881
+ function hasVercelFileData(part) {
10882
+ return "type" in part && part.type === "file" && "mediaType" in part && typeof part.mediaType === "string" && "data" in part && typeof part.data === "string" && // Only strip base64/binary data, not HTTP/HTTPS URLs which should be preserved as references
10883
+ !part.data.startsWith("http://") && !part.data.startsWith("https://");
10884
+ }
10885
+ function hasVercelImageData(part) {
10886
+ return "type" in part && part.type === "image" && "image" in part && typeof part.image === "string" && // Only strip base64/data URIs, not HTTP/HTTPS URLs which should be preserved as references
10887
+ !part.image.startsWith("http://") && !part.image.startsWith("https://");
10888
+ }
10819
10889
  function hasBlobOrBase64Type(part) {
10820
10890
  return "type" in part && (part.type === "blob" || part.type === "base64");
10821
10891
  }
@@ -10829,7 +10899,7 @@ function hasDataUri(part) {
10829
10899
  return "uri" in part && typeof part.uri === "string" && part.uri.startsWith("data:");
10830
10900
  }
10831
10901
  var REMOVED_STRING = "[Blob substitute]";
10832
- var MEDIA_FIELDS = ["image_url", "data", "content", "b64_json", "result", "uri"];
10902
+ var MEDIA_FIELDS = ["image_url", "data", "content", "b64_json", "result", "uri", "image"];
10833
10903
  function stripInlineMediaFromSingleMessage(part) {
10834
10904
  const strip = { ...part };
10835
10905
  if (isContentMedia(strip.source)) {
@@ -10853,7 +10923,7 @@ function stripInlineMediaFromSingleMessage(part) {
10853
10923
  return strip;
10854
10924
  }
10855
10925
 
10856
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/ai/messageTruncation.js
10926
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/ai/messageTruncation.js
10857
10927
  var DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT = 2e4;
10858
10928
  var utf8Bytes = (text) => {
10859
10929
  return new TextEncoder().encode(text).length;
@@ -10881,18 +10951,20 @@ function truncateTextByBytes(text, maxBytes) {
10881
10951
  }
10882
10952
  return bestFit;
10883
10953
  }
10884
- function getPartText(part) {
10885
- if (typeof part === "string") {
10886
- return part;
10954
+ function getItemText(item) {
10955
+ if (typeof item === "string") {
10956
+ return item;
10957
+ }
10958
+ if ("text" in item && typeof item.text === "string") {
10959
+ return item.text;
10887
10960
  }
10888
- if ("text" in part) return part.text;
10889
10961
  return "";
10890
10962
  }
10891
- function withPartText(part, text) {
10892
- if (typeof part === "string") {
10963
+ function withItemText(item, text) {
10964
+ if (typeof item === "string") {
10893
10965
  return text;
10894
10966
  }
10895
- return { ...part, text };
10967
+ return { ...item, text };
10896
10968
  }
10897
10969
  function isContentMessage(message) {
10898
10970
  return message !== null && typeof message === "object" && "content" in message && typeof message.content === "string";
@@ -10913,35 +10985,47 @@ function truncateContentMessage(message, maxBytes) {
10913
10985
  const truncatedContent = truncateTextByBytes(message.content, availableForContent);
10914
10986
  return [{ ...message, content: truncatedContent }];
10915
10987
  }
10916
- function truncatePartsMessage(message, maxBytes) {
10917
- const { parts } = message;
10918
- const emptyParts = parts.map((part) => withPartText(part, ""));
10919
- const overhead = jsonBytes({ ...message, parts: emptyParts });
10988
+ function getArrayItems(message) {
10989
+ if ("parts" in message && Array.isArray(message.parts)) {
10990
+ return { key: "parts", items: message.parts };
10991
+ }
10992
+ if ("content" in message && Array.isArray(message.content)) {
10993
+ return { key: "content", items: message.content };
10994
+ }
10995
+ return { key: null, items: [] };
10996
+ }
10997
+ function truncateArrayMessage(message, maxBytes) {
10998
+ const { key, items } = getArrayItems(message);
10999
+ if (key === null || items.length === 0) {
11000
+ return [];
11001
+ }
11002
+ const emptyItems = items.map((item) => withItemText(item, ""));
11003
+ const overhead = jsonBytes({ ...message, [key]: emptyItems });
10920
11004
  let remainingBytes = maxBytes - overhead;
10921
11005
  if (remainingBytes <= 0) {
10922
11006
  return [];
10923
11007
  }
10924
- const includedParts = [];
10925
- for (const part of parts) {
10926
- const text = getPartText(part);
11008
+ const includedItems = [];
11009
+ for (const item of items) {
11010
+ const text = getItemText(item);
10927
11011
  const textSize = utf8Bytes(text);
10928
11012
  if (textSize <= remainingBytes) {
10929
- includedParts.push(part);
11013
+ includedItems.push(item);
10930
11014
  remainingBytes -= textSize;
10931
- } else if (includedParts.length === 0) {
11015
+ } else if (includedItems.length === 0) {
10932
11016
  const truncated = truncateTextByBytes(text, remainingBytes);
10933
11017
  if (truncated) {
10934
- includedParts.push(withPartText(part, truncated));
11018
+ includedItems.push(withItemText(item, truncated));
10935
11019
  }
10936
11020
  break;
10937
11021
  } else {
10938
11022
  break;
10939
11023
  }
10940
11024
  }
10941
- if (includedParts.length <= 0) {
11025
+ if (includedItems.length <= 0) {
10942
11026
  return [];
10943
11027
  } else {
10944
- return [{ ...message, parts: includedParts }];
11028
+ return [{ ...message, [key]: includedItems }];
10945
11029
  }
10946
11030
  }
10947
11031
  function truncateSingleMessage(message, maxBytes) {
@@ -10956,8 +11040,8 @@ function truncateSingleMessage(message, maxBytes) {
10956
11040
  if (isContentMessage(message)) {
10957
11041
  return truncateContentMessage(message, maxBytes);
10958
11042
  }
10959
- if (isPartsMessage(message)) {
10960
- return truncatePartsMessage(message, maxBytes);
11043
+ if (isContentArrayMessage(message) || isPartsMessage(message)) {
11044
+ return truncateArrayMessage(message, maxBytes);
10961
11045
  }
10962
11046
  return [];
10963
11047
  }
@@ -11014,27 +11098,14 @@ function truncateGenAiStringInput(input) {
11014
11098
  return truncateTextByBytes(input, DEFAULT_GEN_AI_MESSAGES_BYTE_LIMIT);
11015
11099
  }
11016
11100
 
11017
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/ai/utils.js
11018
- function getFinalOperationName(methodPath) {
11019
- if (methodPath.includes("messages")) {
11020
- return "chat";
11021
- }
11022
- if (methodPath.includes("completions")) {
11023
- return "text_completion";
11024
- }
11025
- if (methodPath.includes("generateContent")) {
11026
- return "generate_content";
11027
- }
11028
- if (methodPath.includes("models")) {
11029
- return "models";
11030
- }
11031
- if (methodPath.includes("chat")) {
11032
- return "chat";
11033
- }
11034
- return methodPath.split(".").pop() || "unknown";
11035
- }
11036
- function getSpanOperation(methodPath) {
11037
- return `gen_ai.${getFinalOperationName(methodPath)}`;
11101
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/ai/utils.js
11102
+ function resolveAIRecordingOptions(options) {
11103
+ const sendDefaultPii = Boolean(getClient()?.getOptions().sendDefaultPii);
11104
+ return {
11105
+ ...options,
11106
+ recordInputs: options?.recordInputs ?? sendDefaultPii,
11107
+ recordOutputs: options?.recordOutputs ?? sendDefaultPii
11108
+ };
11038
11109
  }
11039
11110
  function buildMethodPath(currentPath, prop) {
11040
11111
  return currentPath ? `${currentPath}.${prop}` : prop;
@@ -11086,15 +11157,56 @@ function extractSystemInstructions(messages) {
11086
11157
  const filteredMessages = [...messages.slice(0, systemMessageIndex), ...messages.slice(systemMessageIndex + 1)];
11087
11158
  return { systemInstructions, filteredMessages };
11088
11159
  }
11160
+ async function createWithResponseWrapper(originalWithResponse, instrumentedPromise, mechanismType) {
11161
+ const safeOriginalWithResponse = originalWithResponse.catch((error3) => {
11162
+ captureException(error3, {
11163
+ mechanism: {
11164
+ handled: false,
11165
+ type: mechanismType
11166
+ }
11167
+ });
11168
+ throw error3;
11169
+ });
11170
+ const instrumentedResult = await instrumentedPromise;
11171
+ const originalWrapper = await safeOriginalWithResponse;
11172
+ if (originalWrapper && typeof originalWrapper === "object" && "data" in originalWrapper) {
11173
+ return {
11174
+ ...originalWrapper,
11175
+ data: instrumentedResult
11176
+ };
11177
+ }
11178
+ return instrumentedResult;
11179
+ }
11180
+ function wrapPromiseWithMethods(originalPromiseLike, instrumentedPromise, mechanismType) {
11181
+ if (!isThenable(originalPromiseLike)) {
11182
+ return instrumentedPromise;
11183
+ }
11184
+ return new Proxy(originalPromiseLike, {
11185
+ get(target, prop) {
11186
+ const useInstrumentedPromise = prop in Promise.prototype || prop === Symbol.toStringTag;
11187
+ const source = useInstrumentedPromise ? instrumentedPromise : target;
11188
+ const value = Reflect.get(source, prop);
11189
+ if (prop === "withResponse" && typeof value === "function") {
11190
+ return function wrappedWithResponse() {
11191
+ const originalWithResponse = value.call(target);
11192
+ return createWithResponseWrapper(originalWithResponse, instrumentedPromise, mechanismType);
11193
+ };
11194
+ }
11195
+ return typeof value === "function" ? value.bind(source) : value;
11196
+ }
11197
+ });
11198
+ }
11089
11199
 
11090
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/vercel-ai-attributes.js
11200
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/vercel-ai-attributes.js
11091
11201
  var OPERATION_NAME_ATTRIBUTE = "operation.name";
11092
11202
  var AI_OPERATION_ID_ATTRIBUTE = "ai.operationId";
11093
11203
  var AI_PROMPT_ATTRIBUTE = "ai.prompt";
11094
11204
  var AI_SCHEMA_ATTRIBUTE = "ai.schema";
11095
11205
  var AI_RESPONSE_OBJECT_ATTRIBUTE = "ai.response.object";
11206
+ var AI_VALUES_ATTRIBUTE = "ai.values";
11096
11207
  var AI_RESPONSE_TEXT_ATTRIBUTE = "ai.response.text";
11097
11208
  var AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = "ai.response.toolCalls";
11209
+ var AI_RESPONSE_FINISH_REASON_ATTRIBUTE = "ai.response.finishReason";
11098
11210
  var AI_PROMPT_MESSAGES_ATTRIBUTE = "ai.prompt.messages";
11099
11211
  var AI_PROMPT_TOOLS_ATTRIBUTE = "ai.prompt.tools";
11100
11212
  var AI_MODEL_ID_ATTRIBUTE = "ai.model.id";
@@ -11103,12 +11215,13 @@ var AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE = "ai.usage.cachedInputTokens";
11103
11215
  var AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = "ai.telemetry.functionId";
11104
11216
  var AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = "ai.usage.completionTokens";
11105
11217
  var AI_USAGE_PROMPT_TOKENS_ATTRIBUTE = "ai.usage.promptTokens";
11218
+ var AI_USAGE_TOKENS_ATTRIBUTE = "ai.usage.tokens";
11106
11219
  var AI_TOOL_CALL_NAME_ATTRIBUTE = "ai.toolCall.name";
11107
11220
  var AI_TOOL_CALL_ID_ATTRIBUTE = "ai.toolCall.id";
11108
11221
  var AI_TOOL_CALL_ARGS_ATTRIBUTE = "ai.toolCall.args";
11109
11222
  var AI_TOOL_CALL_RESULT_ATTRIBUTE = "ai.toolCall.result";
11110
11223
 
11111
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/utils.js
11224
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/utils.js
11112
11225
  function accumulateTokensForParent(span, tokenAccumulator) {
11113
11226
  const parentSpanId = span.parent_span_id;
11114
11227
  if (!parentSpanId) {
@@ -11142,6 +11255,42 @@ function applyAccumulatedTokens(spanOrTrace, tokenAccumulator) {
11142
11255
  spanOrTrace.data["gen_ai.usage.total_tokens"] = accumulated.inputTokens + accumulated.outputTokens;
11143
11256
  }
11144
11257
  }
11258
+ function buildToolDescriptionMap(spans) {
11259
+ const toolDescriptions = /* @__PURE__ */ new Map();
11260
+ for (const span of spans) {
11261
+ const availableTools = span.data[GEN_AI_REQUEST_AVAILABLE_TOOLS_ATTRIBUTE];
11262
+ if (typeof availableTools !== "string") {
11263
+ continue;
11264
+ }
11265
+ try {
11266
+ const tools = JSON.parse(availableTools);
11267
+ for (const tool of tools) {
11268
+ if (tool.name && tool.description && !toolDescriptions.has(tool.name)) {
11269
+ toolDescriptions.set(tool.name, tool.description);
11270
+ }
11271
+ }
11272
+ } catch {
11273
+ }
11274
+ }
11275
+ return toolDescriptions;
11276
+ }
11277
+ function applyToolDescriptionsAndTokens(spans, tokenAccumulator) {
11278
+ const toolDescriptions = buildToolDescriptionMap(spans);
11279
+ for (const span of spans) {
11280
+ if (span.op === "gen_ai.execute_tool") {
11281
+ const toolName = span.data[GEN_AI_TOOL_NAME_ATTRIBUTE];
11282
+ if (typeof toolName === "string") {
11283
+ const description = toolDescriptions.get(toolName);
11284
+ if (description) {
11285
+ span.data[GEN_AI_TOOL_DESCRIPTION_ATTRIBUTE] = description;
11286
+ }
11287
+ }
11288
+ }
11289
+ if (span.op === "gen_ai.invoke_agent") {
11290
+ applyAccumulatedTokens(span, tokenAccumulator);
11291
+ }
11292
+ }
11293
+ }
11145
11294
  function _INTERNAL_getSpanContextForToolCallId(toolCallId) {
11146
11295
  return toolCallSpanContextMap.get(toolCallId);
11147
11296
  }
@@ -11244,9 +11393,6 @@ function getSpanOpFromName(name) {
11244
11393
  case "ai.streamText":
11245
11394
  case "ai.generateObject":
11246
11395
  case "ai.streamObject":
11247
- case "ai.embed":
11248
- case "ai.embedMany":
11249
- case "ai.rerank":
11250
11396
  return GEN_AI_INVOKE_AGENT_OPERATION_ATTRIBUTE;
11251
11397
  case "ai.generateText.doGenerate":
11252
11398
  return GEN_AI_GENERATE_TEXT_DO_GENERATE_OPERATION_ATTRIBUTE;
@@ -11272,7 +11418,7 @@ function getSpanOpFromName(name) {
11272
11418
  }
11273
11419
  }
11274
11420
 
11275
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/index.js
11421
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/vercel-ai/index.js
11276
11422
  function mapVercelAiOperationName(operationName) {
11277
11423
  if (INVOKE_AGENT_OPS.has(operationName)) {
11278
11424
  return "invoke_agent";
@@ -11312,35 +11458,95 @@ function vercelAiEventProcessor(event) {
11312
11458
  processEndedVercelAiSpan(span);
11313
11459
  accumulateTokensForParent(span, tokenAccumulator);
11314
11460
  }
11315
- for (const span of event.spans) {
11316
- if (span.op !== "gen_ai.invoke_agent") {
11317
- continue;
11318
- }
11319
- applyAccumulatedTokens(span, tokenAccumulator);
11320
- }
11461
+ applyToolDescriptionsAndTokens(event.spans, tokenAccumulator);
11321
11462
  const trace2 = event.contexts?.trace;
11322
- if (trace2 && trace2.op === "gen_ai.invoke_agent") {
11463
+ if (trace2?.op === "gen_ai.invoke_agent") {
11323
11464
  applyAccumulatedTokens(trace2, tokenAccumulator);
11324
11465
  }
11325
11466
  }
11326
11467
  return event;
11327
11468
  }
11469
+ function normalizeFinishReason(finishReason) {
11470
+ if (typeof finishReason !== "string") {
11471
+ return "stop";
11472
+ }
11473
+ switch (finishReason) {
11474
+ case "tool-calls":
11475
+ return "tool_call";
11476
+ case "stop":
11477
+ case "length":
11478
+ case "content_filter":
11479
+ case "error":
11480
+ return finishReason;
11481
+ default:
11482
+ return finishReason;
11483
+ }
11484
+ }
11485
+ function buildOutputMessages(attributes) {
11486
+ const responseText = attributes[AI_RESPONSE_TEXT_ATTRIBUTE];
11487
+ const responseToolCalls = attributes[AI_RESPONSE_TOOL_CALLS_ATTRIBUTE];
11488
+ const finishReason = attributes[AI_RESPONSE_FINISH_REASON_ATTRIBUTE];
11489
+ if (responseText == null && responseToolCalls == null) {
11490
+ return;
11491
+ }
11492
+ const parts = [];
11493
+ if (typeof responseText === "string" && responseText.length > 0) {
11494
+ parts.push({
11495
+ type: "text",
11496
+ content: responseText
11497
+ });
11498
+ }
11499
+ if (responseToolCalls != null) {
11500
+ try {
11501
+ const toolCalls = typeof responseToolCalls === "string" ? JSON.parse(responseToolCalls) : responseToolCalls;
11502
+ if (Array.isArray(toolCalls)) {
11503
+ for (const toolCall of toolCalls) {
11504
+ const args = toolCall.input ?? toolCall.args;
11505
+ parts.push({
11506
+ type: "tool_call",
11507
+ id: toolCall.toolCallId,
11508
+ name: toolCall.toolName,
11509
+ // Handle undefined args: JSON.stringify(undefined) returns undefined, not a string,
11510
+ // which would cause the property to be omitted from the final JSON output
11511
+ arguments: typeof args === "string" ? args : JSON.stringify(args ?? {})
11512
+ });
11513
+ }
11514
+ delete attributes[AI_RESPONSE_TOOL_CALLS_ATTRIBUTE];
11515
+ }
11516
+ } catch {
11517
+ }
11518
+ }
11519
+ if (parts.length > 0) {
11520
+ const outputMessage = {
11521
+ role: "assistant",
11522
+ parts,
11523
+ finish_reason: normalizeFinishReason(finishReason)
11524
+ };
11525
+ attributes[GEN_AI_OUTPUT_MESSAGES_ATTRIBUTE] = JSON.stringify([outputMessage]);
11526
+ delete attributes[AI_RESPONSE_TEXT_ATTRIBUTE];
11527
+ }
11528
+ }
11328
11529
  function processEndedVercelAiSpan(span) {
11329
11530
  const { data: attributes, origin } = span;
11330
11531
  if (origin !== "auto.vercelai.otel") {
11331
11532
  return;
11332
11533
  }
11534
+ if (span.status && span.status !== "ok") {
11535
+ span.status = "internal_error";
11536
+ }
11333
11537
  renameAttributeKey(attributes, AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE, GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE);
11334
11538
  renameAttributeKey(attributes, AI_USAGE_PROMPT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE);
11335
11539
  renameAttributeKey(attributes, AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE);
11336
11540
  renameAttributeKey(attributes, "ai.usage.inputTokens", GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE);
11337
11541
  renameAttributeKey(attributes, "ai.usage.outputTokens", GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE);
11542
+ renameAttributeKey(attributes, AI_USAGE_TOKENS_ATTRIBUTE, GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE);
11338
11543
  renameAttributeKey(attributes, "ai.response.avgOutputTokensPerSecond", "ai.response.avgCompletionTokensPerSecond");
11339
11544
  if (typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] === "number" && typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE] === "number") {
11340
11545
  attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] = attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] + attributes[GEN_AI_USAGE_INPUT_TOKENS_CACHED_ATTRIBUTE];
11341
11546
  }
11342
- if (typeof attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] === "number" && typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] === "number") {
11343
- attributes[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] + attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE];
11547
+ if (typeof attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE] === "number") {
11548
+ const outputTokens = typeof attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] === "number" ? attributes[GEN_AI_USAGE_OUTPUT_TOKENS_ATTRIBUTE] : 0;
11549
+ attributes[GEN_AI_USAGE_TOTAL_TOKENS_ATTRIBUTE] = outputTokens + attributes[GEN_AI_USAGE_INPUT_TOKENS_ATTRIBUTE];
11344
11550
  }
11345
11551
  if (attributes[AI_PROMPT_TOOLS_ATTRIBUTE] && Array.isArray(attributes[AI_PROMPT_TOOLS_ATTRIBUTE])) {
11346
11552
  attributes[AI_PROMPT_TOOLS_ATTRIBUTE] = convertAvailableToolsToJsonString(
@@ -11353,14 +11559,23 @@ function processEndedVercelAiSpan(span) {
11353
11559
  delete attributes[OPERATION_NAME_ATTRIBUTE];
11354
11560
  }
11355
11561
  renameAttributeKey(attributes, AI_PROMPT_MESSAGES_ATTRIBUTE, GEN_AI_INPUT_MESSAGES_ATTRIBUTE);
11356
- renameAttributeKey(attributes, AI_RESPONSE_TEXT_ATTRIBUTE, "gen_ai.response.text");
11357
- renameAttributeKey(attributes, AI_RESPONSE_TOOL_CALLS_ATTRIBUTE, "gen_ai.response.tool_calls");
11562
+ buildOutputMessages(attributes);
11358
11563
  renameAttributeKey(attributes, AI_RESPONSE_OBJECT_ATTRIBUTE, "gen_ai.response.object");
11359
11564
  renameAttributeKey(attributes, AI_PROMPT_TOOLS_ATTRIBUTE, "gen_ai.request.available_tools");
11360
11565
  renameAttributeKey(attributes, AI_TOOL_CALL_ARGS_ATTRIBUTE, GEN_AI_TOOL_INPUT_ATTRIBUTE);
11361
11566
  renameAttributeKey(attributes, AI_TOOL_CALL_RESULT_ATTRIBUTE, GEN_AI_TOOL_OUTPUT_ATTRIBUTE);
11362
11567
  renameAttributeKey(attributes, AI_SCHEMA_ATTRIBUTE, "gen_ai.request.schema");
11363
11568
  renameAttributeKey(attributes, AI_MODEL_ID_ATTRIBUTE, GEN_AI_REQUEST_MODEL_ATTRIBUTE);
11569
+ if (Array.isArray(attributes[AI_VALUES_ATTRIBUTE])) {
11570
+ const parsed = attributes[AI_VALUES_ATTRIBUTE].map((v) => {
11571
+ try {
11572
+ return JSON.parse(v);
11573
+ } catch {
11574
+ return v;
11575
+ }
11576
+ });
11577
+ attributes[GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE] = parsed.length === 1 ? parsed[0] : JSON.stringify(parsed);
11578
+ }
11364
11579
  addProviderMetadataToAttributes(attributes);
11365
11580
  for (const key of Object.keys(attributes)) {
11366
11581
  if (key.startsWith("ai.")) {
@@ -11453,7 +11668,9 @@ function addProviderMetadataToAttributes(attributes) {
11453
11668
  "gen_ai.usage.output_tokens.prediction_rejected",
11454
11669
  openaiMetadata.rejectedPredictionTokens
11455
11670
  );
11456
- setAttributeIfDefined(attributes, "gen_ai.conversation.id", openaiMetadata.responseId);
11671
+ if (!attributes["gen_ai.conversation.id"]) {
11672
+ setAttributeIfDefined(attributes, "gen_ai.conversation.id", openaiMetadata.responseId);
11673
+ }
11457
11674
  }
11458
11675
  if (providerMetadataObject.anthropic) {
11459
11676
  const cachedInputTokens = providerMetadataObject.anthropic.usage?.cache_read_input_tokens ?? providerMetadataObject.anthropic.cacheReadInputTokens;
@@ -11495,16 +11712,16 @@ function setAttributeIfDefined(attributes, key, value) {
11495
11712
  }
11496
11713
  }
11497
11714
 
11498
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/openai/constants.js
11715
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/openai/constants.js
11499
11716
  var OPENAI_INTEGRATION_NAME = "OpenAI";
11500
- var INSTRUMENTED_METHODS = [
11501
- "responses.create",
11502
- "chat.completions.create",
11503
- "embeddings.create",
11717
+ var OPENAI_METHOD_REGISTRY = {
11718
+ "responses.create": { operation: "chat" },
11719
+ "chat.completions.create": { operation: "chat" },
11720
+ "embeddings.create": { operation: "embeddings" },
11504
11721
  // Conversations API - for conversation state management
11505
11722
  // https://platform.openai.com/docs/guides/conversation-state
11506
- "conversations.create"
11507
- ];
11723
+ "conversations.create": { operation: "chat" }
11724
+ };
11508
11725
  var RESPONSES_TOOL_CALL_EVENT_TYPES = [
11509
11726
  "response.output_item.added",
11510
11727
  "response.function_call_arguments.delta",
@@ -11522,31 +11739,7 @@ var RESPONSE_EVENT_TYPES = [
11522
11739
  ...RESPONSES_TOOL_CALL_EVENT_TYPES
11523
11740
  ];
11524
11741
 
11525
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/openai/utils.js
11526
- function getOperationName(methodPath) {
11527
- if (methodPath.includes("chat.completions")) {
11528
- return OPENAI_OPERATIONS.CHAT;
11529
- }
11530
- if (methodPath.includes("responses")) {
11531
- return OPENAI_OPERATIONS.CHAT;
11532
- }
11533
- if (methodPath.includes("embeddings")) {
11534
- return OPENAI_OPERATIONS.EMBEDDINGS;
11535
- }
11536
- if (methodPath.includes("conversations")) {
11537
- return OPENAI_OPERATIONS.CHAT;
11538
- }
11539
- return methodPath.split(".").pop() || "unknown";
11540
- }
11541
- function getSpanOperation2(methodPath) {
11542
- return `gen_ai.${getOperationName(methodPath)}`;
11543
- }
11544
- function shouldInstrument(methodPath) {
11545
- return INSTRUMENTED_METHODS.includes(methodPath);
11546
- }
11547
- function buildMethodPath2(currentPath, prop) {
11548
- return currentPath ? `${currentPath}.${prop}` : prop;
11549
- }
11742
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/openai/utils.js
11550
11743
  function isChatCompletionResponse(response) {
11551
11744
  return response !== null && typeof response === "object" && "object" in response && response.object === "chat.completion";
11552
11745
  }
@@ -11615,7 +11808,10 @@ function addResponsesApiAttributes(span, response, recordOutputs) {
11615
11808
  const responseWithOutput = response;
11616
11809
  if (Array.isArray(responseWithOutput.output) && responseWithOutput.output.length > 0) {
11617
11810
  const functionCalls = responseWithOutput.output.filter(
11618
- (item) => typeof item === "object" && item !== null && item.type === "function_call"
11811
+ (item) => (
11812
+ // oxlint-disable-next-line typescript/prefer-optional-chain
11813
+ typeof item === "object" && item !== null && item.type === "function_call"
11814
+ )
11619
11815
  );
11620
11816
  if (functionCalls.length > 0) {
11621
11817
  span.setAttributes({
@@ -11707,7 +11903,7 @@ function extractRequestParameters(params) {
11707
11903
  return attributes;
11708
11904
  }
11709
11905
 
11710
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/openai/streaming.js
11906
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/openai/streaming.js
11711
11907
  function processChatCompletionToolCalls(toolCalls, state) {
11712
11908
  for (const toolCall of toolCalls) {
11713
11909
  const index = toolCall.index;
@@ -11849,7 +12045,7 @@ async function* instrumentStream(stream, span, recordOutputs) {
11849
12045
  }
11850
12046
  }
11851
12047
 
11852
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/openai/index.js
12048
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/openai/index.js
11853
12049
  function extractAvailableTools(params) {
11854
12050
  const tools = Array.isArray(params.tools) ? params.tools : [];
11855
12051
  const hasWebSearchOptions = params.web_search_options && typeof params.web_search_options === "object";
@@ -11865,10 +12061,10 @@ function extractAvailableTools(params) {
11865
12061
  return void 0;
11866
12062
  }
11867
12063
  }
11868
- function extractRequestAttributes(args, methodPath) {
12064
+ function extractRequestAttributes(args, operationName) {
11869
12065
  const attributes = {
11870
12066
  [GEN_AI_SYSTEM_ATTRIBUTE]: "openai",
11871
- [GEN_AI_OPERATION_NAME_ATTRIBUTE]: getOperationName(methodPath),
12067
+ [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,
11872
12068
  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ai.openai"
11873
12069
  };
11874
12070
  if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
@@ -11904,7 +12100,7 @@ function addResponseAttributes(span, result, recordOutputs) {
11904
12100
  }
11905
12101
  }
11906
12102
  function addRequestAttributes(span, params, operationName) {
11907
- if (operationName === OPENAI_OPERATIONS.EMBEDDINGS && "input" in params) {
12103
+ if (operationName === "embeddings" && "input" in params) {
11908
12104
  const input = params.input;
11909
12105
  if (input == null) {
11910
12106
  return;
@@ -11937,55 +12133,16 @@ function addRequestAttributes(span, params, operationName) {
11937
12133
  span.setAttribute(GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE, 1);
11938
12134
  }
11939
12135
  }
11940
- async function createWithResponseWrapper(originalWithResponse, instrumentedPromise) {
11941
- const safeOriginalWithResponse = originalWithResponse.catch((error3) => {
11942
- captureException(error3, {
11943
- mechanism: {
11944
- handled: false,
11945
- type: "auto.ai.openai"
11946
- }
11947
- });
11948
- throw error3;
11949
- });
11950
- const instrumentedResult = await instrumentedPromise;
11951
- const originalWrapper = await safeOriginalWithResponse;
11952
- if (originalWrapper && typeof originalWrapper === "object" && "data" in originalWrapper) {
11953
- return {
11954
- ...originalWrapper,
11955
- data: instrumentedResult
11956
- };
11957
- }
11958
- return instrumentedResult;
11959
- }
11960
- function wrapPromiseWithMethods(originalPromiseLike, instrumentedPromise) {
11961
- if (!isThenable(originalPromiseLike)) {
11962
- return instrumentedPromise;
11963
- }
11964
- return new Proxy(originalPromiseLike, {
11965
- get(target, prop) {
11966
- const useInstrumentedPromise = prop in Promise.prototype || prop === Symbol.toStringTag;
11967
- const source = useInstrumentedPromise ? instrumentedPromise : target;
11968
- const value = Reflect.get(source, prop);
11969
- if (prop === "withResponse" && typeof value === "function") {
11970
- return function wrappedWithResponse() {
11971
- const originalWithResponse = value.call(target);
11972
- return createWithResponseWrapper(originalWithResponse, instrumentedPromise);
11973
- };
11974
- }
11975
- return typeof value === "function" ? value.bind(source) : value;
11976
- }
11977
- });
11978
- }
11979
- function instrumentMethod(originalMethod, methodPath, context, options) {
11980
- return function instrumentedMethod(...args) {
11981
- const requestAttributes = extractRequestAttributes(args, methodPath);
12136
+ function instrumentMethod(originalMethod, methodPath, instrumentedMethod, context, options) {
12137
+ return function instrumentedCall(...args) {
12138
+ const operationName = instrumentedMethod.operation;
12139
+ const requestAttributes = extractRequestAttributes(args, operationName);
11982
12140
  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] || "unknown";
11983
- const operationName = getOperationName(methodPath);
11984
12141
  const params = args[0];
11985
12142
  const isStreamRequested = params && typeof params === "object" && params.stream === true;
11986
12143
  const spanConfig = {
11987
12144
  name: `${operationName} ${model}`,
11988
- op: getSpanOperation2(methodPath),
12145
+ op: `gen_ai.${operationName}`,
11989
12146
  attributes: requestAttributes
11990
12147
  };
11991
12148
  if (isStreamRequested) {
@@ -12017,7 +12174,7 @@ function instrumentMethod(originalMethod, methodPath, context, options) {
12017
12174
  }
12018
12175
  })();
12019
12176
  });
12020
- return wrapPromiseWithMethods(originalResult2, instrumentedPromise2);
12177
+ return wrapPromiseWithMethods(originalResult2, instrumentedPromise2, "auto.ai.openai");
12021
12178
  }
12022
12179
  let originalResult;
12023
12180
  const instrumentedPromise = startSpan(spanConfig, (span) => {
@@ -12042,16 +12199,23 @@ function instrumentMethod(originalMethod, methodPath, context, options) {
12042
12199
  }
12043
12200
  );
12044
12201
  });
12045
- return wrapPromiseWithMethods(originalResult, instrumentedPromise);
12202
+ return wrapPromiseWithMethods(originalResult, instrumentedPromise, "auto.ai.openai");
12046
12203
  };
12047
12204
  }
12048
12205
  function createDeepProxy(target, currentPath = "", options) {
12049
12206
  return new Proxy(target, {
12050
12207
  get(obj, prop) {
12051
12208
  const value = obj[prop];
12052
- const methodPath = buildMethodPath2(currentPath, String(prop));
12053
- if (typeof value === "function" && shouldInstrument(methodPath)) {
12054
- return instrumentMethod(value, methodPath, obj, options);
12209
+ const methodPath = buildMethodPath(currentPath, String(prop));
12210
+ const instrumentedMethod = OPENAI_METHOD_REGISTRY[methodPath];
12211
+ if (typeof value === "function" && instrumentedMethod) {
12212
+ return instrumentMethod(
12213
+ value,
12214
+ methodPath,
12215
+ instrumentedMethod,
12216
+ obj,
12217
+ options
12218
+ );
12055
12219
  }
12056
12220
  if (typeof value === "function") {
12057
12221
  return value.bind(obj);
@@ -12064,20 +12228,79 @@ function createDeepProxy(target, currentPath = "", options) {
12064
12228
  });
12065
12229
  }
12066
12230
  function instrumentOpenAiClient(client, options) {
12067
- const sendDefaultPii = Boolean(getClient()?.getOptions().sendDefaultPii);
12068
- const _options = {
12069
- recordInputs: sendDefaultPii,
12070
- recordOutputs: sendDefaultPii,
12071
- ...options
12072
- };
12073
- return createDeepProxy(client, "", _options);
12231
+ return createDeepProxy(client, "", resolveAIRecordingOptions(options));
12232
+ }
12233
+
12234
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/constants.js
12235
+ var ANTHROPIC_AI_INTEGRATION_NAME = "Anthropic_AI";
12236
+ var ANTHROPIC_METHOD_REGISTRY = {
12237
+ "messages.create": { operation: "chat" },
12238
+ "messages.stream": { operation: "chat", streaming: true },
12239
+ "messages.countTokens": { operation: "chat" },
12240
+ "models.get": { operation: "models" },
12241
+ "completions.create": { operation: "chat" },
12242
+ "models.retrieve": { operation: "models" },
12243
+ "beta.messages.create": { operation: "chat" }
12244
+ };
12245
+
12246
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/utils.js
12247
+ function setMessagesAttribute(span, messages) {
12248
+ if (Array.isArray(messages) && messages.length === 0) {
12249
+ return;
12250
+ }
12251
+ const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);
12252
+ if (systemInstructions) {
12253
+ span.setAttributes({
12254
+ [GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE]: systemInstructions
12255
+ });
12256
+ }
12257
+ const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 1;
12258
+ span.setAttributes({
12259
+ [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: getTruncatedJsonString(filteredMessages),
12260
+ [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength
12261
+ });
12262
+ }
12263
+ var ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS = {
12264
+ invalid_request_error: "invalid_argument",
12265
+ authentication_error: "unauthenticated",
12266
+ permission_error: "permission_denied",
12267
+ not_found_error: "not_found",
12268
+ request_too_large: "failed_precondition",
12269
+ rate_limit_error: "resource_exhausted",
12270
+ api_error: "internal_error",
12271
+ overloaded_error: "unavailable"
12272
+ };
12273
+ function mapAnthropicErrorToStatusMessage(errorType) {
12274
+ if (!errorType) {
12275
+ return "internal_error";
12276
+ }
12277
+ return ANTHROPIC_ERROR_TYPE_TO_SPAN_STATUS[errorType] || "internal_error";
12278
+ }
12279
+ function handleResponseError(span, response) {
12280
+ if (response.error) {
12281
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: mapAnthropicErrorToStatusMessage(response.error.type) });
12282
+ captureException(response.error, {
12283
+ mechanism: {
12284
+ handled: false,
12285
+ type: "auto.ai.anthropic.anthropic_error"
12286
+ }
12287
+ });
12288
+ }
12289
+ }
12290
+ function messagesFromParams(params) {
12291
+ const { system, messages, input } = params;
12292
+ const systemMessages = typeof system === "string" ? [{ role: "system", content: params.system }] : [];
12293
+ const inputParamMessages = Array.isArray(input) ? input : input != null ? [input] : void 0;
12294
+ const messagesParamMessages = Array.isArray(messages) ? messages : messages != null ? [messages] : [];
12295
+ const userMessages = inputParamMessages ?? messagesParamMessages;
12296
+ return [...systemMessages, ...userMessages];
12074
12297
  }
12075
12298
 
12076
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/streaming.js
12299
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/streaming.js
12077
12300
  function isErrorEvent3(event, span) {
12078
12301
  if ("type" in event && typeof event.type === "string") {
12079
12302
  if (event.type === "error") {
12080
- span.setStatus({ code: SPAN_STATUS_ERROR, message: event.error?.type ?? "internal_error" });
12303
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: mapAnthropicErrorToStatusMessage(event.error?.type) });
12081
12304
  captureException(event.error, {
12082
12305
  mechanism: {
12083
12306
  handled: false,
@@ -12286,70 +12509,18 @@ function instrumentMessageStream(stream, span, recordOutputs) {
12286
12509
  }
12287
12510
  });
12288
12511
  if (span.isRecording()) {
12289
- span.setStatus({ code: SPAN_STATUS_ERROR, message: "stream_error" });
12512
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
12290
12513
  span.end();
12291
12514
  }
12292
12515
  });
12293
12516
  return stream;
12294
12517
  }
12295
12518
 
12296
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/constants.js
12297
- var ANTHROPIC_AI_INTEGRATION_NAME = "Anthropic_AI";
12298
- var ANTHROPIC_AI_INSTRUMENTED_METHODS = [
12299
- "messages.create",
12300
- "messages.stream",
12301
- "messages.countTokens",
12302
- "models.get",
12303
- "completions.create",
12304
- "models.retrieve",
12305
- "beta.messages.create"
12306
- ];
12307
-
12308
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/utils.js
12309
- function shouldInstrument2(methodPath) {
12310
- return ANTHROPIC_AI_INSTRUMENTED_METHODS.includes(methodPath);
12311
- }
12312
- function setMessagesAttribute(span, messages) {
12313
- if (Array.isArray(messages) && messages.length === 0) {
12314
- return;
12315
- }
12316
- const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);
12317
- if (systemInstructions) {
12318
- span.setAttributes({
12319
- [GEN_AI_SYSTEM_INSTRUCTIONS_ATTRIBUTE]: systemInstructions
12320
- });
12321
- }
12322
- const filteredLength = Array.isArray(filteredMessages) ? filteredMessages.length : 1;
12323
- span.setAttributes({
12324
- [GEN_AI_INPUT_MESSAGES_ATTRIBUTE]: getTruncatedJsonString(filteredMessages),
12325
- [GEN_AI_INPUT_MESSAGES_ORIGINAL_LENGTH_ATTRIBUTE]: filteredLength
12326
- });
12327
- }
12328
- function handleResponseError(span, response) {
12329
- if (response.error) {
12330
- span.setStatus({ code: SPAN_STATUS_ERROR, message: response.error.type || "internal_error" });
12331
- captureException(response.error, {
12332
- mechanism: {
12333
- handled: false,
12334
- type: "auto.ai.anthropic.anthropic_error"
12335
- }
12336
- });
12337
- }
12338
- }
12339
- function messagesFromParams(params) {
12340
- const { system, messages, input } = params;
12341
- const systemMessages = typeof system === "string" ? [{ role: "system", content: params.system }] : [];
12342
- const inputParamMessages = Array.isArray(input) ? input : input != null ? [input] : void 0;
12343
- const messagesParamMessages = Array.isArray(messages) ? messages : messages != null ? [messages] : [];
12344
- const userMessages = inputParamMessages ?? messagesParamMessages;
12345
- return [...systemMessages, ...userMessages];
12346
- }
12347
-
12348
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/index.js
12349
- function extractRequestAttributes2(args, methodPath) {
12519
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/anthropic-ai/index.js
12520
+ function extractRequestAttributes2(args, methodPath, operationName) {
12350
12521
  const attributes = {
12351
12522
  [GEN_AI_SYSTEM_ATTRIBUTE]: "anthropic",
12352
- [GEN_AI_OPERATION_NAME_ATTRIBUTE]: getFinalOperationName(methodPath),
12523
+ [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,
12353
12524
  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ai.anthropic"
12354
12525
  };
12355
12526
  if (args.length > 0 && typeof args[0] === "object" && args[0] !== null) {
@@ -12453,29 +12624,34 @@ function handleStreamingError(error3, span, methodPath) {
12453
12624
  }
12454
12625
  throw error3;
12455
12626
  }
12456
- function handleStreamingRequest(originalMethod, target, context, args, requestAttributes, operationName, methodPath, params, options, isStreamRequested, isStreamingMethod2) {
12627
+ function handleStreamingRequest(originalMethod, target, context, args, requestAttributes, operationName, methodPath, params, options, isStreamRequested, isStreamingMethod) {
12457
12628
  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? "unknown";
12458
12629
  const spanConfig = {
12459
12630
  name: `${operationName} ${model}`,
12460
- op: getSpanOperation(methodPath),
12631
+ op: `gen_ai.${operationName}`,
12461
12632
  attributes: requestAttributes
12462
12633
  };
12463
- if (isStreamRequested && !isStreamingMethod2) {
12464
- return startSpanManual(spanConfig, async (span) => {
12465
- try {
12466
- if (options.recordInputs && params) {
12467
- addPrivateRequestAttributes(span, params);
12468
- }
12469
- const result = await originalMethod.apply(context, args);
12470
- return instrumentAsyncIterableStream(
12471
- result,
12472
- span,
12473
- options.recordOutputs ?? false
12474
- );
12475
- } catch (error3) {
12476
- return handleStreamingError(error3, span, methodPath);
12634
+ if (isStreamRequested && !isStreamingMethod) {
12635
+ let originalResult;
12636
+ const instrumentedPromise = startSpanManual(spanConfig, (span) => {
12637
+ originalResult = originalMethod.apply(context, args);
12638
+ if (options.recordInputs && params) {
12639
+ addPrivateRequestAttributes(span, params);
12477
12640
  }
12641
+ return (async () => {
12642
+ try {
12643
+ const result = await originalResult;
12644
+ return instrumentAsyncIterableStream(
12645
+ result,
12646
+ span,
12647
+ options.recordOutputs ?? false
12648
+ );
12649
+ } catch (error3) {
12650
+ return handleStreamingError(error3, span, methodPath);
12651
+ }
12652
+ })();
12478
12653
  });
12654
+ return wrapPromiseWithMethods(originalResult, instrumentedPromise, "auto.ai.anthropic");
12479
12655
  } else {
12480
12656
  return startSpanManual(spanConfig, (span) => {
12481
12657
  try {
@@ -12490,16 +12666,16 @@ function handleStreamingRequest(originalMethod, target, context, args, requestAt
12490
12666
  });
12491
12667
  }
12492
12668
  }
12493
- function instrumentMethod2(originalMethod, methodPath, context, options) {
12669
+ function instrumentMethod2(originalMethod, methodPath, instrumentedMethod, context, options) {
12494
12670
  return new Proxy(originalMethod, {
12495
12671
  apply(target, thisArg, args) {
12496
- const requestAttributes = extractRequestAttributes2(args, methodPath);
12672
+ const operationName = instrumentedMethod.operation;
12673
+ const requestAttributes = extractRequestAttributes2(args, methodPath, operationName);
12497
12674
  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? "unknown";
12498
- const operationName = getFinalOperationName(methodPath);
12499
12675
  const params = typeof args[0] === "object" ? args[0] : void 0;
12500
12676
  const isStreamRequested = Boolean(params?.stream);
12501
- const isStreamingMethod2 = methodPath === "messages.stream";
12502
- if (isStreamRequested || isStreamingMethod2) {
12677
+ const isStreamingMethod = instrumentedMethod.streaming === true;
12678
+ if (isStreamRequested || isStreamingMethod) {
12503
12679
  return handleStreamingRequest(
12504
12680
  originalMethod,
12505
12681
  target,
@@ -12511,21 +12687,26 @@ function instrumentMethod2(originalMethod, methodPath, context, options) {
12511
12687
  params,
12512
12688
  options,
12513
12689
  isStreamRequested,
12514
- isStreamingMethod2
12690
+ isStreamingMethod
12515
12691
  );
12516
12692
  }
12517
- return startSpan(
12693
+ let originalResult;
12694
+ const instrumentedPromise = startSpan(
12518
12695
  {
12519
12696
  name: `${operationName} ${model}`,
12520
- op: getSpanOperation(methodPath),
12697
+ op: `gen_ai.${operationName}`,
12521
12698
  attributes: requestAttributes
12522
12699
  },
12523
12700
  (span) => {
12701
+ originalResult = target.apply(context, args);
12524
12702
  if (options.recordInputs && params) {
12525
12703
  addPrivateRequestAttributes(span, params);
12526
12704
  }
12527
- return handleCallbackErrors(
12528
- () => target.apply(context, args),
12705
+ return originalResult.then(
12706
+ (result) => {
12707
+ addResponseAttributes2(span, result, options.recordOutputs);
12708
+ return result;
12709
+ },
12529
12710
  (error3) => {
12530
12711
  captureException(error3, {
12531
12712
  mechanism: {
@@ -12536,13 +12717,12 @@ function instrumentMethod2(originalMethod, methodPath, context, options) {
12536
12717
  }
12537
12718
  }
12538
12719
  });
12539
- },
12540
- () => {
12541
- },
12542
- (result) => addResponseAttributes2(span, result, options.recordOutputs)
12720
+ throw error3;
12721
+ }
12543
12722
  );
12544
12723
  }
12545
12724
  );
12725
+ return wrapPromiseWithMethods(originalResult, instrumentedPromise, "auto.ai.anthropic");
12546
12726
  }
12547
12727
  });
12548
12728
  }
@@ -12551,8 +12731,15 @@ function createDeepProxy2(target, currentPath = "", options) {
12551
12731
  get(obj, prop) {
12552
12732
  const value = obj[prop];
12553
12733
  const methodPath = buildMethodPath(currentPath, String(prop));
12554
- if (typeof value === "function" && shouldInstrument2(methodPath)) {
12555
- return instrumentMethod2(value, methodPath, obj, options);
12734
+ const instrumentedMethod = ANTHROPIC_METHOD_REGISTRY[methodPath];
12735
+ if (typeof value === "function" && instrumentedMethod) {
12736
+ return instrumentMethod2(
12737
+ value,
12738
+ methodPath,
12739
+ instrumentedMethod,
12740
+ obj,
12741
+ options
12742
+ );
12556
12743
  }
12557
12744
  if (typeof value === "function") {
12558
12745
  return value.bind(obj);
@@ -12565,34 +12752,30 @@ function createDeepProxy2(target, currentPath = "", options) {
12565
12752
  });
12566
12753
  }
12567
12754
  function instrumentAnthropicAiClient(anthropicAiClient, options) {
12568
- const sendDefaultPii = Boolean(getClient()?.getOptions().sendDefaultPii);
12569
- const _options = {
12570
- recordInputs: sendDefaultPii,
12571
- recordOutputs: sendDefaultPii,
12572
- ...options
12573
- };
12574
- return createDeepProxy2(anthropicAiClient, "", _options);
12755
+ return createDeepProxy2(anthropicAiClient, "", resolveAIRecordingOptions(options));
12575
12756
  }
12576
12757
 
12577
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/google-genai/constants.js
12758
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/google-genai/constants.js
12578
12759
  var GOOGLE_GENAI_INTEGRATION_NAME = "Google_GenAI";
12579
- var GOOGLE_GENAI_INSTRUMENTED_METHODS = [
12580
- "models.generateContent",
12581
- "models.generateContentStream",
12582
- "chats.create",
12583
- "sendMessage",
12584
- "sendMessageStream"
12585
- ];
12760
+ var GOOGLE_GENAI_METHOD_REGISTRY = {
12761
+ "models.generateContent": { operation: "generate_content" },
12762
+ "models.generateContentStream": { operation: "generate_content", streaming: true },
12763
+ "models.embedContent": { operation: "embeddings" },
12764
+ "chats.create": { operation: "chat" },
12765
+ // chat.* paths are built by createDeepProxy when it proxies the chat instance with CHAT_PATH as base
12766
+ "chat.sendMessage": { operation: "chat" },
12767
+ "chat.sendMessageStream": { operation: "chat", streaming: true }
12768
+ };
12586
12769
  var GOOGLE_GENAI_SYSTEM_NAME = "google_genai";
12587
12770
  var CHATS_CREATE_METHOD = "chats.create";
12588
12771
  var CHAT_PATH = "chat";
12589
12772
 
12590
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/google-genai/streaming.js
12773
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/google-genai/streaming.js
12591
12774
  function isErrorChunk(chunk, span) {
12592
12775
  const feedback = chunk?.promptFeedback;
12593
12776
  if (feedback?.blockReason) {
12594
12777
  const message = feedback.blockReasonMessage ?? feedback.blockReason;
12595
- span.setStatus({ code: SPAN_STATUS_ERROR, message: `Content blocked: ${message}` });
12778
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
12596
12779
  captureException(`Content blocked: ${message}`, {
12597
12780
  mechanism: { handled: false, type: "auto.ai.google_genai" }
12598
12781
  });
@@ -12670,17 +12853,7 @@ async function* instrumentStream2(stream, span, recordOutputs) {
12670
12853
  }
12671
12854
  }
12672
12855
 
12673
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/google-genai/utils.js
12674
- function shouldInstrument3(methodPath) {
12675
- if (GOOGLE_GENAI_INSTRUMENTED_METHODS.includes(methodPath)) {
12676
- return true;
12677
- }
12678
- const methodName = methodPath.split(".").pop();
12679
- return GOOGLE_GENAI_INSTRUMENTED_METHODS.includes(methodName);
12680
- }
12681
- function isStreamingMethod(methodPath) {
12682
- return methodPath.includes("Stream");
12683
- }
12856
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/google-genai/utils.js
12684
12857
  function contentUnionToMessages(content, role = "user") {
12685
12858
  if (typeof content === "string") {
12686
12859
  return [{ role, content }];
@@ -12698,7 +12871,7 @@ function contentUnionToMessages(content, role = "user") {
12698
12871
  return [{ role, content }];
12699
12872
  }
12700
12873
 
12701
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/google-genai/index.js
12874
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/google-genai/index.js
12702
12875
  function extractModel(params, context) {
12703
12876
  if ("model" in params && typeof params.model === "string") {
12704
12877
  return params.model;
@@ -12736,10 +12909,10 @@ function extractConfigAttributes(config) {
12736
12909
  }
12737
12910
  return attributes;
12738
12911
  }
12739
- function extractRequestAttributes3(methodPath, params, context) {
12912
+ function extractRequestAttributes3(operationName, params, context) {
12740
12913
  const attributes = {
12741
12914
  [GEN_AI_SYSTEM_ATTRIBUTE]: GOOGLE_GENAI_SYSTEM_NAME,
12742
- [GEN_AI_OPERATION_NAME_ATTRIBUTE]: getFinalOperationName(methodPath),
12915
+ [GEN_AI_OPERATION_NAME_ATTRIBUTE]: operationName,
12743
12916
  [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.ai.google_genai"
12744
12917
  };
12745
12918
  if (params) {
@@ -12759,7 +12932,17 @@ function extractRequestAttributes3(methodPath, params, context) {
12759
12932
  }
12760
12933
  return attributes;
12761
12934
  }
12762
- function addPrivateRequestAttributes2(span, params) {
12935
+ function addPrivateRequestAttributes2(span, params, isEmbeddings) {
12936
+ if (isEmbeddings) {
12937
+ const contents = params.contents;
12938
+ if (contents != null) {
12939
+ span.setAttribute(
12940
+ GEN_AI_EMBEDDINGS_INPUT_ATTRIBUTE,
12941
+ typeof contents === "string" ? contents : JSON.stringify(contents)
12942
+ );
12943
+ }
12944
+ return;
12945
+ }
12763
12946
  const messages = [];
12764
12947
  if ("config" in params && params.config && typeof params.config === "object" && "systemInstruction" in params.config && params.config.systemInstruction) {
12765
12948
  messages.push(...contentUnionToMessages(params.config.systemInstruction, "system"));
@@ -12830,25 +13013,26 @@ function addResponseAttributes3(span, response, recordOutputs) {
12830
13013
  }
12831
13014
  }
12832
13015
  }
12833
- function instrumentMethod3(originalMethod, methodPath, context, options) {
13016
+ function instrumentMethod3(originalMethod, methodPath, instrumentedMethod, context, options) {
12834
13017
  const isSyncCreate = methodPath === CHATS_CREATE_METHOD;
13018
+ const isEmbeddings = instrumentedMethod.operation === "embeddings";
12835
13019
  return new Proxy(originalMethod, {
12836
13020
  apply(target, _, args) {
13021
+ const operationName = instrumentedMethod.operation;
12837
13022
  const params = args[0];
12838
- const requestAttributes = extractRequestAttributes3(methodPath, params, context);
13023
+ const requestAttributes = extractRequestAttributes3(operationName, params, context);
12839
13024
  const model = requestAttributes[GEN_AI_REQUEST_MODEL_ATTRIBUTE] ?? "unknown";
12840
- const operationName = getFinalOperationName(methodPath);
12841
- if (isStreamingMethod(methodPath)) {
13025
+ if (instrumentedMethod.streaming) {
12842
13026
  return startSpanManual(
12843
13027
  {
12844
13028
  name: `${operationName} ${model}`,
12845
- op: getSpanOperation(methodPath),
13029
+ op: `gen_ai.${operationName}`,
12846
13030
  attributes: requestAttributes
12847
13031
  },
12848
13032
  async (span) => {
12849
13033
  try {
12850
13034
  if (options.recordInputs && params) {
12851
- addPrivateRequestAttributes2(span, params);
13035
+ addPrivateRequestAttributes2(span, params, isEmbeddings);
12852
13036
  }
12853
13037
  const stream = await target.apply(context, args);
12854
13038
  return instrumentStream2(stream, span, Boolean(options.recordOutputs));
@@ -12870,12 +13054,12 @@ function instrumentMethod3(originalMethod, methodPath, context, options) {
12870
13054
  return startSpan(
12871
13055
  {
12872
13056
  name: isSyncCreate ? `${operationName} ${model} create` : `${operationName} ${model}`,
12873
- op: getSpanOperation(methodPath),
13057
+ op: `gen_ai.${operationName}`,
12874
13058
  attributes: requestAttributes
12875
13059
  },
12876
13060
  (span) => {
12877
13061
  if (options.recordInputs && params) {
12878
- addPrivateRequestAttributes2(span, params);
13062
+ addPrivateRequestAttributes2(span, params, isEmbeddings);
12879
13063
  }
12880
13064
  return handleCallbackErrors(
12881
13065
  () => target.apply(context, args),
@@ -12887,7 +13071,7 @@ function instrumentMethod3(originalMethod, methodPath, context, options) {
12887
13071
  () => {
12888
13072
  },
12889
13073
  (result) => {
12890
- if (!isSyncCreate) {
13074
+ if (!isSyncCreate && !isEmbeddings) {
12891
13075
  addResponseAttributes3(span, result, options.recordOutputs);
12892
13076
  }
12893
13077
  }
@@ -12902,18 +13086,31 @@ function createDeepProxy3(target, currentPath = "", options) {
12902
13086
  get: (t, prop, receiver) => {
12903
13087
  const value = Reflect.get(t, prop, receiver);
12904
13088
  const methodPath = buildMethodPath(currentPath, String(prop));
12905
- if (typeof value === "function" && shouldInstrument3(methodPath)) {
13089
+ const instrumentedMethod = GOOGLE_GENAI_METHOD_REGISTRY[methodPath];
13090
+ if (typeof value === "function" && instrumentedMethod) {
12906
13091
  if (methodPath === CHATS_CREATE_METHOD) {
12907
- const instrumentedMethod = instrumentMethod3(value, methodPath, t, options);
13092
+ const wrappedMethod = instrumentMethod3(
13093
+ value,
13094
+ methodPath,
13095
+ instrumentedMethod,
13096
+ t,
13097
+ options
13098
+ );
12908
13099
  return function instrumentedAndProxiedCreate(...args) {
12909
- const result = instrumentedMethod(...args);
13100
+ const result = wrappedMethod(...args);
12910
13101
  if (result && typeof result === "object") {
12911
13102
  return createDeepProxy3(result, CHAT_PATH, options);
12912
13103
  }
12913
13104
  return result;
12914
13105
  };
12915
13106
  }
12916
- return instrumentMethod3(value, methodPath, t, options);
13107
+ return instrumentMethod3(
13108
+ value,
13109
+ methodPath,
13110
+ instrumentedMethod,
13111
+ t,
13112
+ options
13113
+ );
12917
13114
  }
12918
13115
  if (typeof value === "function") {
12919
13116
  return value.bind(t);
@@ -12926,16 +13123,10 @@ function createDeepProxy3(target, currentPath = "", options) {
12926
13123
  });
12927
13124
  }
12928
13125
  function instrumentGoogleGenAIClient(client, options) {
12929
- const sendDefaultPii = Boolean(getClient()?.getOptions().sendDefaultPii);
12930
- const _options = {
12931
- recordInputs: sendDefaultPii,
12932
- recordOutputs: sendDefaultPii,
12933
- ...options
12934
- };
12935
- return createDeepProxy3(client, "", _options);
13126
+ return createDeepProxy3(client, "", resolveAIRecordingOptions(options));
12936
13127
  }
12937
13128
 
12938
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/langchain/constants.js
13129
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/langchain/constants.js
12939
13130
  var LANGCHAIN_INTEGRATION_NAME = "LangChain";
12940
13131
  var LANGCHAIN_ORIGIN = "auto.ai.langchain";
12941
13132
  var ROLE_MAP = {
@@ -12947,7 +13138,7 @@ var ROLE_MAP = {
12947
13138
  tool: "tool"
12948
13139
  };
12949
13140
 
12950
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/langchain/utils.js
13141
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/langchain/utils.js
12951
13142
  var setIfDefined = (target, key, value) => {
12952
13143
  if (value != null) target[key] = value;
12953
13144
  };
@@ -13174,10 +13365,9 @@ function extractLlmResponseAttributes(llmResult, recordOutputs) {
13174
13365
  return attrs;
13175
13366
  }
13176
13367
 
13177
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/langchain/index.js
13368
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/langchain/index.js
13178
13369
  function createLangChainCallbackHandler(options = {}) {
13179
- const recordInputs = options.recordInputs ?? false;
13180
- const recordOutputs = options.recordOutputs ?? false;
13370
+ const { recordInputs, recordOutputs } = resolveAIRecordingOptions(options);
13181
13371
  const spanMap = /* @__PURE__ */ new Map();
13182
13372
  const exitSpan = (runId) => {
13183
13373
  const span = spanMap.get(runId);
@@ -13273,7 +13463,7 @@ function createLangChainCallbackHandler(options = {}) {
13273
13463
  handleLLMError(error3, runId) {
13274
13464
  const span = spanMap.get(runId);
13275
13465
  if (span?.isRecording()) {
13276
- span.setStatus({ code: SPAN_STATUS_ERROR, message: "llm_error" });
13466
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
13277
13467
  exitSpan(runId);
13278
13468
  }
13279
13469
  captureException(error3, {
@@ -13324,7 +13514,7 @@ function createLangChainCallbackHandler(options = {}) {
13324
13514
  handleChainError(error3, runId) {
13325
13515
  const span = spanMap.get(runId);
13326
13516
  if (span?.isRecording()) {
13327
- span.setStatus({ code: SPAN_STATUS_ERROR, message: "chain_error" });
13517
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
13328
13518
  exitSpan(runId);
13329
13519
  }
13330
13520
  captureException(error3, {
@@ -13375,7 +13565,7 @@ function createLangChainCallbackHandler(options = {}) {
13375
13565
  handleToolError(error3, runId) {
13376
13566
  const span = spanMap.get(runId);
13377
13567
  if (span?.isRecording()) {
13378
- span.setStatus({ code: SPAN_STATUS_ERROR, message: "tool_error" });
13568
+ span.setStatus({ code: SPAN_STATUS_ERROR, message: "internal_error" });
13379
13569
  exitSpan(runId);
13380
13570
  }
13381
13571
  captureException(error3, {
@@ -13407,11 +13597,11 @@ function createLangChainCallbackHandler(options = {}) {
13407
13597
  return handler;
13408
13598
  }
13409
13599
 
13410
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/langgraph/constants.js
13600
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/langgraph/constants.js
13411
13601
  var LANGGRAPH_INTEGRATION_NAME = "LangGraph";
13412
13602
  var LANGGRAPH_ORIGIN = "auto.ai.langgraph";
13413
13603
 
13414
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/langgraph/utils.js
13604
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/langgraph/utils.js
13415
13605
  function extractToolCalls(messages) {
13416
13606
  if (!messages || messages.length === 0) {
13417
13607
  return null;
@@ -13526,7 +13716,7 @@ function setResponseAttributes(span, inputMessages, result) {
13526
13716
  }
13527
13717
  }
13528
13718
 
13529
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/tracing/langgraph/index.js
13719
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/tracing/langgraph/index.js
13530
13720
  function instrumentStateGraphCompile(originalCompile, options) {
13531
13721
  return new Proxy(originalCompile, {
13532
13722
  apply(target, thisArg, args) {
@@ -13641,12 +13831,11 @@ function instrumentCompiledGraphInvoke(originalInvoke, graphInstance, compileOpt
13641
13831
  });
13642
13832
  }
13643
13833
  function instrumentLangGraph(stateGraph, options) {
13644
- const _options = options || {};
13645
- stateGraph.compile = instrumentStateGraphCompile(stateGraph.compile.bind(stateGraph), _options);
13834
+ stateGraph.compile = instrumentStateGraphCompile(stateGraph.compile, resolveAIRecordingOptions(options));
13646
13835
  return stateGraph;
13647
13836
  }
13648
13837
 
13649
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/breadcrumb-log-level.js
13838
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/breadcrumb-log-level.js
13650
13839
  function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
13651
13840
  if (statusCode === void 0) {
13652
13841
  return void 0;
@@ -13659,7 +13848,7 @@ function getBreadcrumbLogLevelFromHttpStatusCode(statusCode) {
13659
13848
  }
13660
13849
  }
13661
13850
 
13662
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/error.js
13851
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/error.js
13663
13852
  var SentryError = class extends Error {
13664
13853
  constructor(message, logLevel = "warn") {
13665
13854
  super(message);
@@ -13668,7 +13857,7 @@ var SentryError = class extends Error {
13668
13857
  }
13669
13858
  };
13670
13859
 
13671
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/supports.js
13860
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/supports.js
13672
13861
  var WINDOW2 = GLOBAL_OBJ;
13673
13862
  function supportsErrorEvent() {
13674
13863
  try {
@@ -13758,7 +13947,7 @@ function supportsReferrerPolicy() {
13758
13947
  }
13759
13948
  }
13760
13949
 
13761
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/instrument/fetch.js
13950
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/instrument/fetch.js
13762
13951
  function addFetchInstrumentationHandler(handler, skipNativeFetchCheck) {
13763
13952
  const type = "fetch";
13764
13953
  addHandler(type, handler);
@@ -13941,7 +14130,7 @@ function getHeadersFromFetchArgs(fetchArgs) {
13941
14130
  return;
13942
14131
  }
13943
14132
 
13944
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/env.js
14133
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/env.js
13945
14134
  function isBrowserBundle() {
13946
14135
  return typeof __SENTRY_BROWSER_BUNDLE__ !== "undefined" && !!__SENTRY_BROWSER_BUNDLE__;
13947
14136
  }
@@ -13949,7 +14138,7 @@ function getSDKSource() {
13949
14138
  return "npm";
13950
14139
  }
13951
14140
 
13952
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/node.js
14141
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/node.js
13953
14142
  function isNodeEnv() {
13954
14143
  return !isBrowserBundle() && Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
13955
14144
  }
@@ -13972,7 +14161,7 @@ function loadModule(moduleName, existingModule = module) {
13972
14161
  return mod;
13973
14162
  }
13974
14163
 
13975
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/isBrowser.js
14164
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/isBrowser.js
13976
14165
  function isBrowser() {
13977
14166
  return typeof window !== "undefined" && (!isNodeEnv() || isElectronNodeRenderer());
13978
14167
  }
@@ -13981,7 +14170,7 @@ function isElectronNodeRenderer() {
13981
14170
  return process2?.type === "renderer";
13982
14171
  }
13983
14172
 
13984
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/exports.js
14173
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/exports.js
13985
14174
  function replaceExports(exports$1, exportName, wrappedConstructor) {
13986
14175
  const original = exports$1[exportName];
13987
14176
  if (typeof original !== "function") {
@@ -13989,7 +14178,7 @@ function replaceExports(exports$1, exportName, wrappedConstructor) {
13989
14178
  }
13990
14179
  try {
13991
14180
  exports$1[exportName] = wrappedConstructor;
13992
- } catch (error3) {
14181
+ } catch {
13993
14182
  Object.defineProperty(exports$1, exportName, {
13994
14183
  value: wrappedConstructor,
13995
14184
  writable: true,
@@ -14000,7 +14189,7 @@ function replaceExports(exports$1, exportName, wrappedConstructor) {
14000
14189
  if (exports$1.default === original) {
14001
14190
  try {
14002
14191
  exports$1.default = wrappedConstructor;
14003
- } catch (error3) {
14192
+ } catch {
14004
14193
  Object.defineProperty(exports$1, "default", {
14005
14194
  value: wrappedConstructor,
14006
14195
  writable: true,
@@ -14011,7 +14200,7 @@ function replaceExports(exports$1, exportName, wrappedConstructor) {
14011
14200
  }
14012
14201
  }
14013
14202
 
14014
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/node-stack-trace.js
14203
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/node-stack-trace.js
14015
14204
  function filenameIsInApp(filename, isNative = false) {
14016
14205
  const isInternal = isNative || filename && // It's not internal if it's an absolute linux path
14017
14206
  !filename.startsWith("/") && // It's not internal if it's an absolute windows path
@@ -14105,7 +14294,7 @@ function _safeDecodeURI(filename) {
14105
14294
  }
14106
14295
  }
14107
14296
 
14108
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/anr.js
14297
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/anr.js
14109
14298
  function watchdogTimer(createTimer, pollInterval, anrThreshold, callback) {
14110
14299
  const timer = createTimer();
14111
14300
  let triggered = false;
@@ -14145,7 +14334,7 @@ function callFrameToStackFrame(frame, url, getModuleFromFilename) {
14145
14334
  };
14146
14335
  }
14147
14336
 
14148
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/lru.js
14337
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/lru.js
14149
14338
  var LRUMap = class {
14150
14339
  constructor(_maxSize) {
14151
14340
  this._maxSize = _maxSize;
@@ -14197,7 +14386,7 @@ var LRUMap = class {
14197
14386
  }
14198
14387
  };
14199
14388
 
14200
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/vercelWaitUntil.js
14389
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/vercelWaitUntil.js
14201
14390
  function vercelWaitUntil(task) {
14202
14391
  if (typeof EdgeRuntime !== "string") {
14203
14392
  return;
@@ -14212,7 +14401,7 @@ function vercelWaitUntil(task) {
14212
14401
  }
14213
14402
  }
14214
14403
 
14215
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/utils/flushIfServerless.js
14404
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/utils/flushIfServerless.js
14216
14405
  async function flushWithTimeout(timeout) {
14217
14406
  try {
14218
14407
  debug.log("Flushing events...");
@@ -14249,7 +14438,7 @@ async function flushIfServerless(params = {}) {
14249
14438
  }
14250
14439
  }
14251
14440
 
14252
- // ../node_modules/.pnpm/@sentry+core@10.43.0/node_modules/@sentry/core/build/esm/vendor/escapeStringForRegex.js
14441
+ // node_modules/.pnpm/@sentry+core@10.47.0/node_modules/@sentry/core/build/esm/vendor/escapeStringForRegex.js
14253
14442
  function escapeStringForRegex(regexString) {
14254
14443
  return regexString.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
14255
14444
  }
@@ -14287,6 +14476,7 @@ export {
14287
14476
  SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
14288
14477
  SEMANTIC_ATTRIBUTE_URL_FULL,
14289
14478
  SEMANTIC_LINK_ATTRIBUTE_LINK_TYPE,
14479
+ SENTRY_API_VERSION,
14290
14480
  SENTRY_BAGGAGE_KEY_PREFIX,
14291
14481
  SENTRY_BAGGAGE_KEY_PREFIX_REGEX,
14292
14482
  SENTRY_BUFFER_FULL_ERROR,
@@ -14319,6 +14509,7 @@ export {
14319
14509
  _INTERNAL_insertFlagToScope,
14320
14510
  safeDateNow as _INTERNAL_safeDateNow,
14321
14511
  safeMathRandom as _INTERNAL_safeMathRandom,
14512
+ safeUnref as _INTERNAL_safeUnref,
14322
14513
  _setSpanForScope as _INTERNAL_setSpanForScope,
14323
14514
  _INTERNAL_shouldSkipAiProviderWrapping,
14324
14515
  _INTERNAL_skipAiProviderWrapping,
@@ -14430,6 +14621,7 @@ export {
14430
14621
  getDynamicSamplingContextFromSpan,
14431
14622
  getEnvelopeEndpointWithUrlEncodedAuth,
14432
14623
  getEventDescription,
14624
+ getExternalPropagationContext,
14433
14625
  getFilenameToDebugIdMap,
14434
14626
  getFilenameToMetadataMap,
14435
14627
  getFramesFromEvent,
@@ -14457,6 +14649,7 @@ export {
14457
14649
  growthbookIntegration,
14458
14650
  handleCallbackErrors,
14459
14651
  handleTunnelRequest,
14652
+ hasExternalPropagationContext,
14460
14653
  hasSpansEnabled,
14461
14654
  headersToDict,
14462
14655
  htmlTreeAsString,
@@ -14539,6 +14732,7 @@ export {
14539
14732
  prepareEvent,
14540
14733
  profiler,
14541
14734
  propagationContextFromHeaders,
14735
+ registerExternalPropagationContext,
14542
14736
  registerSpanErrorInstrumentation,
14543
14737
  rejectedSyncPromise,
14544
14738
  relative,
@@ -14615,4 +14809,4 @@ export {
14615
14809
  wrapMcpServerWithSentry,
14616
14810
  zodErrorsIntegration
14617
14811
  };
14618
- //# sourceMappingURL=esm-JQB7UAJD.js.map
14812
+ //# sourceMappingURL=esm-2EUDFZWP.js.map