@sentry/server-utils 11.21.0 → 11.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/build/cjs/chunks/config.js +2 -0
  2. package/build/cjs/chunks/config.js.map +1 -1
  3. package/build/cjs/chunks/exports.js +4 -1
  4. package/build/cjs/chunks/exports.js.map +1 -1
  5. package/build/cjs/index.js +53 -16
  6. package/build/cjs/index.js.map +1 -1
  7. package/build/esm/ai/workers-ai/utils.js +4 -1
  8. package/build/esm/ai/workers-ai/utils.js.map +1 -1
  9. package/build/esm/integrations/fastify/instrumentation.js +5 -1
  10. package/build/esm/integrations/fastify/instrumentation.js.map +1 -1
  11. package/build/esm/integrations/neon.js +10 -2
  12. package/build/esm/integrations/neon.js.map +1 -1
  13. package/build/esm/integrations/pg.js +41 -14
  14. package/build/esm/integrations/pg.js.map +1 -1
  15. package/build/esm/integrations/pino.js.map +1 -1
  16. package/build/esm/integrations/vercel-ai/extract.js +2 -3
  17. package/build/esm/integrations/vercel-ai/extract.js.map +1 -1
  18. package/build/esm/orchestrion/config/prisma.js +2 -0
  19. package/build/esm/orchestrion/config/prisma.js.map +1 -1
  20. package/build/esm/package.json +1 -1
  21. package/build/esm/tracing-channel.js.map +1 -1
  22. package/build/types/ai/workers-ai/utils.d.ts.map +1 -1
  23. package/build/types/integrations/fastify/instrumentation.d.ts.map +1 -1
  24. package/build/types/integrations/neon.d.ts.map +1 -1
  25. package/build/types/integrations/pg.d.ts +6 -1
  26. package/build/types/integrations/pg.d.ts.map +1 -1
  27. package/build/types/integrations/pino.d.ts.map +1 -1
  28. package/build/types/integrations/vercel-ai/extract.d.ts +2 -5
  29. package/build/types/integrations/vercel-ai/extract.d.ts.map +1 -1
  30. package/build/types/orchestrion/channels.d.ts +1 -0
  31. package/build/types/orchestrion/channels.d.ts.map +1 -1
  32. package/build/types/orchestrion/config/prisma.d.ts +2 -1
  33. package/build/types/orchestrion/config/prisma.d.ts.map +1 -1
  34. package/build/types/tracing-channel.d.ts.map +1 -1
  35. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.js","names":[],"sources":["../../../../src/orchestrion/config/prisma.ts"],"sourcesContent":["import type { InstrumentationConfig } from '../apmTypes';\nimport { getModuleNames } from './module-names';\n\n// Prisma 8 has no tracing surface, so its ORM terminals are wrapped directly. Apps install\n// `@prisma/orm-postgres`, but `CollectionBase` lives in the transitive `@prisma/orm-family-sql`.\nconst MODULE_NAME = '@prisma/orm-family-sql';\nconst ORM_CLIENT_FILE = 'dist/orm-client.mjs';\n\nconst VERSION_RANGE = '>=8.0.0-rc.15 <9';\n\nexport const PRISMA_ASYNC_TERMINALS = [\n 'aggregate',\n 'first',\n 'create',\n 'createAndCount',\n 'upsert',\n 'update',\n 'updateAndCount',\n 'delete',\n 'deleteAndCount',\n] as const;\n\n// These return a single-use thenable whose query runs on consumption. `Sync` on purpose: the `Async`/`Auto`\n// wrapper calls `.then()` on non-native thenables and would consume the result before the app does.\nexport const PRISMA_LAZY_TERMINALS = ['all', 'createAll', 'updateAll', 'deleteAll'] as const;\n\ntype PrismaTerminal = (typeof PRISMA_ASYNC_TERMINALS)[number] | (typeof PRISMA_LAZY_TERMINALS)[number];\n\nfunction terminalConfig(methodName: PrismaTerminal, kind: 'Async' | 'Sync'): InstrumentationConfig {\n return {\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange: VERSION_RANGE, filePath: ORM_CLIENT_FILE },\n functionQuery: { className: 'CollectionBase', methodName, kind },\n };\n}\n\nexport const prismaConfig: InstrumentationConfig[] = [\n ...PRISMA_ASYNC_TERMINALS.map(methodName => terminalConfig(methodName, 'Async')),\n ...PRISMA_LAZY_TERMINALS.map(methodName => terminalConfig(methodName, 'Sync')),\n];\n\nexport const prismaModuleNames = getModuleNames(prismaConfig);\n\nexport const prismaChannels = {\n PRISMA_AGGREGATE: 'orchestrion:@prisma/orm-family-sql:aggregate',\n PRISMA_FIRST: 'orchestrion:@prisma/orm-family-sql:first',\n PRISMA_CREATE: 'orchestrion:@prisma/orm-family-sql:create',\n PRISMA_CREATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:createAndCount',\n PRISMA_UPSERT: 'orchestrion:@prisma/orm-family-sql:upsert',\n PRISMA_UPDATE: 'orchestrion:@prisma/orm-family-sql:update',\n PRISMA_UPDATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:updateAndCount',\n PRISMA_DELETE: 'orchestrion:@prisma/orm-family-sql:delete',\n PRISMA_DELETE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:deleteAndCount',\n PRISMA_ALL: 'orchestrion:@prisma/orm-family-sql:all',\n PRISMA_CREATE_ALL: 'orchestrion:@prisma/orm-family-sql:createAll',\n PRISMA_UPDATE_ALL: 'orchestrion:@prisma/orm-family-sql:updateAll',\n PRISMA_DELETE_ALL: 'orchestrion:@prisma/orm-family-sql:deleteAll',\n} as const;\n"],"mappings":";;AAKA,MAAM,cAAc;AACpB,MAAM,kBAAkB;AAExB,MAAM,gBAAgB;AAEtB,MAAa,yBAAyB;CACpC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAa,wBAAwB;CAAC;CAAO;CAAa;CAAa;AAAW;AAIlF,SAAS,eAAe,YAA4B,MAA+C;CACjG,OAAO;EACL,aAAa;EACb,QAAQ;GAAE,MAAM;GAAa,cAAc;GAAe,UAAU;EAAgB;EACpF,eAAe;GAAE,WAAW;GAAkB;GAAY;EAAK;CACjE;AACF;AAEA,MAAa,eAAwC,CACnD,GAAG,uBAAuB,KAAI,eAAc,eAAe,YAAY,OAAO,CAAC,GAC/E,GAAG,sBAAsB,KAAI,eAAc,eAAe,YAAY,MAAM,CAAC,CAC/E;AAEA,MAAa,oBAAoB,eAAe,YAAY;AAE5D,MAAa,iBAAiB;CAC5B,kBAAkB;CAClB,cAAc;CACd,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,yBAAyB;CACzB,YAAY;CACZ,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;AACrB"}
1
+ {"version":3,"file":"prisma.js","names":[],"sources":["../../../../src/orchestrion/config/prisma.ts"],"sourcesContent":["import type { InstrumentationConfig } from '../apmTypes';\nimport { getModuleNames } from './module-names';\n\n// Prisma 8 has no tracing surface, so its ORM terminals are wrapped directly. Apps install\n// `@prisma/orm-postgres`, but `CollectionBase` lives in the transitive `@prisma/orm-family-sql`.\nconst MODULE_NAME = '@prisma/orm-family-sql';\nconst ORM_CLIENT_FILE = 'dist/orm-client.mjs';\n\nconst VERSION_RANGE = '>=8.0.0-rc.15 <9';\n\nexport const PRISMA_ASYNC_TERMINALS = [\n 'aggregate',\n 'first',\n // Added in rc.18. orchestrion's range check can't order RC numbers, so older RCs get its constructor fallback:\n // every collection gains an own async `firstOrThrow` that rejects when called, and a custom collection's own\n // `firstOrThrow` is wrapped as async. We only support the latest RC.\n 'firstOrThrow',\n 'create',\n 'createAndCount',\n 'upsert',\n 'update',\n 'updateAndCount',\n 'delete',\n 'deleteAndCount',\n] as const;\n\n// These return a single-use thenable whose query runs on consumption. `Sync` on purpose: the `Async`/`Auto`\n// wrapper calls `.then()` on non-native thenables and would consume the result before the app does.\nexport const PRISMA_LAZY_TERMINALS = ['all', 'createAll', 'updateAll', 'deleteAll'] as const;\n\ntype PrismaTerminal = (typeof PRISMA_ASYNC_TERMINALS)[number] | (typeof PRISMA_LAZY_TERMINALS)[number];\n\nfunction terminalConfig(methodName: PrismaTerminal, kind: 'Async' | 'Sync'): InstrumentationConfig {\n return {\n channelName: methodName,\n module: { name: MODULE_NAME, versionRange: VERSION_RANGE, filePath: ORM_CLIENT_FILE },\n functionQuery: { className: 'CollectionBase', methodName, kind },\n };\n}\n\nexport const prismaConfig: InstrumentationConfig[] = [\n ...PRISMA_ASYNC_TERMINALS.map(methodName => terminalConfig(methodName, 'Async')),\n ...PRISMA_LAZY_TERMINALS.map(methodName => terminalConfig(methodName, 'Sync')),\n];\n\nexport const prismaModuleNames = getModuleNames(prismaConfig);\n\nexport const prismaChannels = {\n PRISMA_AGGREGATE: 'orchestrion:@prisma/orm-family-sql:aggregate',\n PRISMA_FIRST: 'orchestrion:@prisma/orm-family-sql:first',\n PRISMA_FIRST_OR_THROW: 'orchestrion:@prisma/orm-family-sql:firstOrThrow',\n PRISMA_CREATE: 'orchestrion:@prisma/orm-family-sql:create',\n PRISMA_CREATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:createAndCount',\n PRISMA_UPSERT: 'orchestrion:@prisma/orm-family-sql:upsert',\n PRISMA_UPDATE: 'orchestrion:@prisma/orm-family-sql:update',\n PRISMA_UPDATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:updateAndCount',\n PRISMA_DELETE: 'orchestrion:@prisma/orm-family-sql:delete',\n PRISMA_DELETE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:deleteAndCount',\n PRISMA_ALL: 'orchestrion:@prisma/orm-family-sql:all',\n PRISMA_CREATE_ALL: 'orchestrion:@prisma/orm-family-sql:createAll',\n PRISMA_UPDATE_ALL: 'orchestrion:@prisma/orm-family-sql:updateAll',\n PRISMA_DELETE_ALL: 'orchestrion:@prisma/orm-family-sql:deleteAll',\n} as const;\n"],"mappings":";;AAKA,MAAM,cAAc;AACpB,MAAM,kBAAkB;AAExB,MAAM,gBAAgB;AAEtB,MAAa,yBAAyB;CACpC;CACA;CAIA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAIA,MAAa,wBAAwB;CAAC;CAAO;CAAa;CAAa;AAAW;AAIlF,SAAS,eAAe,YAA4B,MAA+C;CACjG,OAAO;EACL,aAAa;EACb,QAAQ;GAAE,MAAM;GAAa,cAAc;GAAe,UAAU;EAAgB;EACpF,eAAe;GAAE,WAAW;GAAkB;GAAY;EAAK;CACjE;AACF;AAEA,MAAa,eAAwC,CACnD,GAAG,uBAAuB,KAAI,eAAc,eAAe,YAAY,OAAO,CAAC,GAC/E,GAAG,sBAAsB,KAAI,eAAc,eAAe,YAAY,MAAM,CAAC,CAC/E;AAEA,MAAa,oBAAoB,eAAe,YAAY;AAE5D,MAAa,iBAAiB;CAC5B,kBAAkB;CAClB,cAAc;CACd,uBAAuB;CACvB,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,eAAe;CACf,yBAAyB;CACzB,eAAe;CACf,yBAAyB;CACzB,YAAY;CACZ,mBAAmB;CACnB,mBAAmB;CACnB,mBAAmB;AACrB"}
@@ -1 +1 @@
1
- {"type":"module","version":"11.21.0","sideEffects":false}
1
+ {"type":"module","version":"11.22.0","sideEffects":false}
@@ -1 +1 @@
1
- {"version":3,"file":"tracing-channel.js","names":[],"sources":["../../src/tracing-channel.ts"],"sourcesContent":["import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel';\nimport type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { ExclusiveEventHintOrCaptureContext, Span } from '@sentry/core';\nimport {\n debug,\n captureException,\n isObjectLike,\n SPAN_STATUS_ERROR,\n getAsyncContextStrategy,\n getMainCarrier,\n spanIsIgnored,\n getRootSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { ERROR_TYPE } from '@sentry/conventions/attributes';\n\nexport type TracingChannelPayloadWithSpan<TData extends object> = TData & {\n /**\n * The current active span for the traced call.\n */\n _sentrySpan?: Span;\n\n /**\n * The context's active store value, used to restore the context for asyncStart continuations for callback-based tracing.\n */\n _sentryCallerStore?: unknown;\n\n /** Set by Node's tracing channel when the traced operation failed. */\n error?: unknown;\n};\n\n/*\n * A type patch so that we don't have to handle all subscription types.\n */\nexport interface SentryTracingChannel<TData extends object = object> extends Omit<\n TracingChannel<TData, TracingChannelPayloadWithSpan<TData>>,\n 'subscribe' | 'unsubscribe'\n> {\n subscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n unsubscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n}\n\nexport interface TracingChannelLifeCycleOptions<TData extends object = object> {\n /**\n * Invoked with the span and the channel context object once the traced operation completes\n * Use it to enrich the span from the result/error (branch on `'error' in data` / `'result' in data`) or to run cleanup.\n */\n beforeSpanEnd?: (span: Span, data: TracingChannelPayloadWithSpan<TData>) => void;\n\n /**\n * Whether a thrown error is captured as a Sentry event. The span is always marked with error status regardless. Defaults to `false`.\n * You can alternatively pass a function that sets the ExclusiveEventHintOrCaptureContext on the captured error.\n * Set `true` for instrumentations that own the error boundary, (e.g: route handlers)\n * For database drivers, it is not recommended to set this at all.\n */\n captureError?: boolean | ((e: unknown) => ExclusiveEventHintOrCaptureContext);\n\n /**\n * Take ownership of *when* the span ends: return `true` and the helper won't end it on\n * `end`/`asyncEnd`. For results that settle out-of-band — e.g. a streamed `EventEmitter` that\n * completes via its own `'end'`/`'error'` events.\n *\n * Call `end` when it settles — `end()` on success, `end(error)` on failure. `end` owns *how* the span\n * ends (error status/attributes, `captureError`, `beforeSpanEnd`) and is idempotent. Default `false`\n * lets the helper end the span as usual.\n */\n deferSpanEnd?: (args: {\n span: Span;\n data: TracingChannelPayloadWithSpan<TData>;\n /** Ends the span: `end()` on success, `end(error)` on failure (which marks `data` as errored). Idempotent. */\n end: (error?: unknown) => void;\n }) => boolean;\n}\n\n/** Returned by {@link bindTracingChannelToSpan}: the bound channel plus a teardown handle. */\nexport interface TracingChannelBindingHandle<TData extends object = object> {\n /**\n * The tracing channel with the span bound into async context.\n */\n channel: SentryTracingChannel<TData>;\n\n /**\n * Tears down the binding: unsubscribes lifecycle handlers, when present, and unbinds the start store.\n * Idempotent, and a no-op when no async context binding was available.\n */\n unbind: () => void;\n}\n\nconst NOOP = (): void => {};\n\n/** Runs a span-building callback so a throw inside it can never break the user's traced call. */\nexport function safeChannelCallback<T>(fn: () => T): T | undefined {\n try {\n return fn();\n } catch (error) {\n DEBUG_BUILD && debug.warn('[instrumentation] error handling channel event', error);\n return undefined;\n }\n}\n\n/**\n * Bind a span and its lifecycle to a tracing channel so the span becomes the active async context\n * for the traced operation and is ended when the operation completes.\n *\n * `getSpan` may return `undefined` to opt a payload out entirely: nothing is bound, no span is\n * tracked, and the active context is left untouched. Use it for events that ride the same channel\n * but should reuse the enclosing span instead of opening (and ending) their own — e.g. an agent\n * loop's per-step events, where ending a freshly opened span would close the parent prematurely.\n */\nexport function bindTracingChannelToSpan<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n opts?: TracingChannelLifeCycleOptions<TData>,\n): TracingChannelBindingHandle<TData> {\n const handle = bindSpanToChannelStore(channel, getSpan);\n\n const beforeSpanEnd = opts?.beforeSpanEnd;\n const deferSpanEnd = opts?.deferSpanEnd;\n const getErrorHint = (e: unknown): ExclusiveEventHintOrCaptureContext => {\n if (typeof opts?.captureError === 'function') {\n return opts.captureError(e);\n }\n\n return {\n mechanism: {\n type: 'auto.diagnostic_channels.bind_span',\n handled: false,\n },\n };\n };\n\n // Apply Sentry error status + attributes (and capture, if configured) to a span. Shared by the\n // channel `error` lifecycle and the deferred `end` util so the two can't drift.\n const annotateSpanError = (span: Span, error: unknown): void => {\n if (opts?.captureError) {\n captureException(error, getErrorHint(error));\n }\n\n const { message, attributes } = getErrorInfo(error);\n span.setStatus({ code: SPAN_STATUS_ERROR, message });\n span.setAttributes(attributes);\n };\n\n // Creates an end fn for deferred handlers to use, ensures consistent span end behavior\n const makeDeferredEnd = (span: Span, data: TracingChannelPayloadWithSpan<TData>) => {\n let ended = false;\n\n return (error?: unknown): void => {\n if (ended) {\n return;\n }\n\n ended = true;\n if (error !== undefined) {\n annotateSpanError(span, error);\n // Without this the payload still looks successful, so `beforeSpanEnd` enriches the span from\n // a `result` the operation never produced.\n data.error = error;\n }\n\n endBoundSpan(data, beforeSpanEnd);\n };\n };\n\n const subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>> = {\n start: NOOP,\n asyncStart: NOOP,\n end(data) {\n // The operation settled synchronously (returned or threw)\n // Presence checks because caller can return `undefined` result or throw a falsy value.\n if ('error' in data || 'result' in data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n }\n },\n error(data) {\n // No span was bound for this payload (`getSpan` returned undefined), so there is nothing to\n // annotate and no instrumentation that owns capturing this error.\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n\n annotateSpanError(span, data.error);\n },\n asyncEnd(data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n },\n };\n\n handle.channel.subscribe(subscribers);\n\n return {\n channel: handle.channel,\n unbind: () => {\n handle.channel.unsubscribe(subscribers);\n handle.unbind();\n },\n };\n}\n\n/**\n * Bind a span into the channel's async context so it becomes active for the traced operation,\n * without managing its lifecycle. The primitive behind {@link bindTracingChannelToSpan}, which\n * layers span-ending and error handling on top.\n *\n * `getSpan` may return `undefined` to leave the active context untouched for that payload.\n */\nexport function bindSpanToChannelStore<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n): TracingChannelBindingHandle<TData> {\n // Grabs the tracing channel binding defined by the AsyncContext strategy implementation\n const binding = getAsyncContextStrategy(getMainCarrier()).getTracingChannelBinding?.();\n\n // If no binding, then either the implementer doesn't support tracing channels or there is no active strategy\n // Failure mode here means we would still access the channel and potentially subscribe to it, but parenting will be off.\n if (!binding) {\n DEBUG_BUILD && debug.log('[TracingChannel] Could not access async context binding.');\n\n return {\n channel,\n unbind: NOOP,\n };\n }\n\n // Grab the ALS instance, we don't really care what is in it as long as the AsyncContext strategy can use its value to figure out parenting.\n const asyncLocalStorage = binding.asyncLocalStorage as AsyncLocalStorage<TData>;\n\n // bindStore activates the ALS for the traced call; any getStore() inside it returns the value bound for that context.\n // 1. Produce: Binds the span to the active context via withActiveSpan(span), and returns the store for the active context.\n // 2. Bind: the courier hands that opaque value to channel.start.bindStore(asyncLocalStorage, producer), which runs the traced op inside asyncLocalStorage.run(value, …); it never inspects the value.\n // 3. Read: inside the op, Sentry's scope machinery calls getScopes() → asyncStorage.getStore() on that same ALS, so getCurrentScope/getIsolationScope/getActiveSpan resolve to the scope carrying our span.\n // 4. Nest: any child span started in the traced op parents to that active span.\n channel.start.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n // Stash the caller's store before we swap in the span store, so `asyncStart` can restore it for\n // callback-style channels (see `_sentryCallerStore`).\n data._sentryCallerStore = asyncLocalStorage.getStore();\n\n const span = getSpan(data);\n if (!span) {\n // Leave the active context untouched so nested operations keep parenting to the enclosing span.\n return data._sentryCallerStore as TData;\n }\n data._sentrySpan = span;\n\n return getStoreWithActiveSpan(asyncLocalStorage, span) as TData;\n });\n\n // Restore the caller's context for the async continuation. Only callback-style channels `runStores`\n // `asyncStart` (so the callback runs inside this store). promise channels `publish` it, leaving this\n // inert, their continuation already inherits the caller's context natively.\n channel.asyncStart.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n return data._sentryCallerStore as TData;\n });\n\n return {\n channel,\n unbind: () => {\n // Removes the stores\n channel.start.unbindStore(asyncLocalStorage);\n channel.asyncStart.unbindStore(asyncLocalStorage);\n },\n };\n}\n\nfunction endBoundSpan<TData extends object>(\n data: TracingChannelPayloadWithSpan<TData>,\n beforeSpanEnd: TracingChannelLifeCycleOptions<TData>['beforeSpanEnd'],\n): void {\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n beforeSpanEnd?.(span, data);\n span.end();\n}\n\ntype ErrorInfo = {\n message: string | undefined;\n attributes: Record<string, string>;\n};\n\n/**\n * Best-effort message and attribute extraction for thrown/rejected values.\n */\nfunction getErrorInfo(error: unknown): ErrorInfo {\n const errorIsObject = isObjectLike(error);\n const raw = errorIsObject ? ('message' in error ? error.message : undefined) : error;\n\n // Leave the status message unset if not set (e.g. an `AggregateError` from\n // ECONNREFUSED, whose `.message` is empty). Otherwise cast to string.\n const message = raw ? String(raw) : undefined;\n const type = errorIsObject && 'name' in error ? String(error.name) : 'unknown';\n\n return {\n message,\n attributes: {\n [ERROR_TYPE]: type,\n },\n };\n}\n\nfunction getStoreWithActiveSpan(asyncLocalStorage: AsyncLocalStorage<unknown>, span: Span): unknown {\n // Do not make an ignored *child* the active span: no span is emitted for it, so its children and\n // outgoing requests must propagate from the nearest emitted parent instead. An ignored *root* is\n // still activated so its whole subtree is dropped with it. Mirrors core `startSpan` and the OTel\n // context manager (`spanIsIgnored(span) && getRootSpan(span) !== span`).\n if (spanIsIgnored(span) && getRootSpan(span) !== span) {\n return asyncLocalStorage.getStore();\n }\n\n return withActiveSpan(span, () => {\n return asyncLocalStorage.getStore();\n });\n}\n"],"mappings":";;;;AAyFA,MAAM,aAAmB,CAAC;;AAG1B,SAAgB,oBAAuB,IAA4B;CACjE,IAAI;EACF,OAAO,GAAG;CACZ,SAAS,OAAO;EACd,eAAe,MAAM,KAAK,kDAAkD,KAAK;EACjF;CACF;AACF;;;;;;;;;;AAWA,SAAgB,yBACd,SACA,SACA,MACoC;CACpC,MAAM,SAAS,uBAAuB,SAAS,OAAO;CAEtD,MAAM,gBAAgB,MAAM;CAC5B,MAAM,eAAe,MAAM;CAC3B,MAAM,gBAAgB,MAAmD;EACvE,IAAI,OAAO,MAAM,iBAAiB,YAChC,OAAO,KAAK,aAAa,CAAC;EAG5B,OAAO,EACL,WAAW;GACT,MAAM;GACN,SAAS;EACX,EACF;CACF;CAIA,MAAM,qBAAqB,MAAY,UAAyB;EAC9D,IAAI,MAAM,cACR,iBAAiB,OAAO,aAAa,KAAK,CAAC;EAG7C,MAAM,EAAE,SAAS,eAAe,aAAa,KAAK;EAClD,KAAK,UAAU;GAAE,MAAM;GAAmB;EAAQ,CAAC;EACnD,KAAK,cAAc,U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AEH,OAAO,KAAK;EAEd,KAAK,cAAc;EAEnB,OAAO,uBAAuB,mBAAmB,IAAI;CACvD,CAAC;CAKD,QAAQ,WAAW,UAAU,oBAAoB,SAA+C;EAC9F,OAAO,KAAK;CACd,CAAC;CAED,OAAO;EACL;EACA,cAAc;GAEZ,QAAQ,MAAM,YAAY,iBAAiB;GAC3C,QAAQ,WAAW,YAAY,iBAAiB;EAClD;CACF;AACF;AAEA,SAAS,aACP,MACA,eACM;CACN,MAAM,OAAO,KAAK;CAClB,IAAI,CAAC,MACH;CAEF,gBAAgB,MAAM,IAAI;CAC1B,KAAK,IAAI;AACX;;;;AAUA,SAAS,aAAa,OAA2B;CAC/C,MAAM,gBAAgB,aAAa,KAAK;CACxC,MAAM,MAAM,gBAAiB,aAAa,QAAQ,MAAM,UAAU,KAAA,IAAa;CAI/E,MAAM,UAAU,MAAM,OAAO,GAAG,IAAI,KAAA;CACpC,MAAM,OAAO,iBAAiB,UAAU,QAAQ,OAAO,MAAM,IAAI,IAAI;CAErE,OAAO;EACL;EACA,YAAY,GACT,aAAa,KAChB;CACF;AACF;AAEA,SAAS,uBAAuB,mBAA+C,MAAqB;CAKlG,IAAI,cAAc,IAAI,KAAK,YAAY,IAAI,MAAM,MAC/C,OAAO,kBAAkB,SAAS;CAGpC,OAAO,eAAe,YAAY;EAChC,OAAO,kBAAkB,SAAS;CACpC,CAAC;AACH"}
1
+ {"version":3,"file":"tracing-channel.js","names":[],"sources":["../../src/tracing-channel.ts"],"sourcesContent":["import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel';\nimport type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { ExclusiveEventHintOrCaptureContext, Span } from '@sentry/core';\nimport {\n debug,\n captureException,\n isObjectLike,\n SPAN_STATUS_ERROR,\n getAsyncContextStrategy,\n getMainCarrier,\n spanIsIgnored,\n getRootSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from './debug-build';\nimport { ERROR_TYPE } from '@sentry/conventions/attributes';\n\nexport type TracingChannelPayloadWithSpan<TData extends object> = TData & {\n /**\n * The current active span for the traced call.\n */\n _sentrySpan?: Span;\n\n /**\n * The context's active store value, used to restore the context for asyncStart continuations for callback-based tracing.\n */\n _sentryCallerStore?: unknown;\n\n /** Set by Node's tracing channel when the traced operation failed. */\n error?: unknown;\n};\n\n/*\n * A type patch so that we don't have to handle all subscription types.\n */\nexport interface SentryTracingChannel<TData extends object = object> extends Omit<\n TracingChannel<TData, TracingChannelPayloadWithSpan<TData>>,\n 'subscribe' | 'unsubscribe'\n> {\n subscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n unsubscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;\n}\n\nexport interface TracingChannelLifeCycleOptions<TData extends object = object> {\n /**\n * Invoked with the span and the channel context object once the traced operation completes\n * Use it to enrich the span from the result/error (branch on `'error' in data` / `'result' in data`) or to run cleanup.\n */\n beforeSpanEnd?: (span: Span, data: TracingChannelPayloadWithSpan<TData>) => void;\n\n /**\n * Whether a thrown error is captured as a Sentry event. The span is always marked with error status regardless. Defaults to `false`.\n * You can alternatively pass a function that sets the ExclusiveEventHintOrCaptureContext on the captured error.\n * Set `true` for instrumentations that own the error boundary, (e.g: route handlers)\n * For database drivers, it is not recommended to set this at all.\n */\n captureError?: boolean | ((e: unknown) => ExclusiveEventHintOrCaptureContext);\n\n /**\n * Take ownership of *when* the span ends: return `true` and the helper won't end it on\n * `end`/`asyncEnd`. For results that settle out-of-band — e.g. a streamed `EventEmitter` that\n * completes via its own `'end'`/`'error'` events.\n *\n * Call `end` when it settles — `end()` on success, `end(error)` on failure. `end` owns *how* the span\n * ends (error status/attributes, `captureError`, `beforeSpanEnd`) and is idempotent. Default `false`\n * lets the helper end the span as usual.\n */\n deferSpanEnd?: (args: {\n span: Span;\n data: TracingChannelPayloadWithSpan<TData>;\n /** Ends the span: `end()` on success, `end(error)` on failure (which marks `data` as errored). Idempotent. */\n end: (error?: unknown) => void;\n }) => boolean;\n}\n\n/** Returned by {@link bindTracingChannelToSpan}: the bound channel plus a teardown handle. */\nexport interface TracingChannelBindingHandle<TData extends object = object> {\n /**\n * The tracing channel with the span bound into async context.\n */\n channel: SentryTracingChannel<TData>;\n\n /**\n * Tears down the binding: unsubscribes lifecycle handlers, when present, and unbinds the start store.\n * Idempotent, and a no-op when no async context binding was available.\n */\n unbind: () => void;\n}\n\nconst NOOP = (): void => {};\n\n/** Runs a span-building callback so a throw inside it can never break the user's traced call. */\nexport function safeChannelCallback<T>(fn: () => T): T | undefined {\n try {\n return fn();\n } catch (error) {\n DEBUG_BUILD && debug.warn('[instrumentation] error handling channel event', error);\n return undefined;\n }\n}\n\n/**\n * Bind a span and its lifecycle to a tracing channel so the span becomes the active async context\n * for the traced operation and is ended when the operation completes.\n *\n * `getSpan` may return `undefined` to opt a payload out entirely: nothing is bound, no span is\n * tracked, and the active context is left untouched. Use it for events that ride the same channel\n * but should reuse the enclosing span instead of opening (and ending) their own — e.g. an agent\n * loop's per-step events, where ending a freshly opened span would close the parent prematurely.\n */\nexport function bindTracingChannelToSpan<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n opts?: TracingChannelLifeCycleOptions<TData>,\n): TracingChannelBindingHandle<TData> {\n const handle = bindSpanToChannelStore(channel, getSpan);\n\n const beforeSpanEnd = opts?.beforeSpanEnd;\n const deferSpanEnd = opts?.deferSpanEnd;\n const getErrorHint = (e: unknown): ExclusiveEventHintOrCaptureContext => {\n if (typeof opts?.captureError === 'function') {\n return opts.captureError(e);\n }\n\n return {\n mechanism: {\n type: 'auto.diagnostic_channels.bind_span',\n handled: false,\n },\n };\n };\n\n // Apply Sentry error status + attributes (and capture, if configured) to a span. Shared by the\n // channel `error` lifecycle and the deferred `end` util so the two can't drift.\n const annotateSpanError = (span: Span, error: unknown): void => {\n if (opts?.captureError) {\n // oxlint-disable-next-line sdk/require-exception-mechanism -- hint comes from `getErrorHint`, which sets a mechanism unless `captureError` overrides it\n captureException(error, getErrorHint(error));\n }\n\n const { message, attributes } = getErrorInfo(error);\n span.setStatus({ code: SPAN_STATUS_ERROR, message });\n span.setAttributes(attributes);\n };\n\n // Creates an end fn for deferred handlers to use, ensures consistent span end behavior\n const makeDeferredEnd = (span: Span, data: TracingChannelPayloadWithSpan<TData>) => {\n let ended = false;\n\n return (error?: unknown): void => {\n if (ended) {\n return;\n }\n\n ended = true;\n if (error !== undefined) {\n annotateSpanError(span, error);\n // Without this the payload still looks successful, so `beforeSpanEnd` enriches the span from\n // a `result` the operation never produced.\n data.error = error;\n }\n\n endBoundSpan(data, beforeSpanEnd);\n };\n };\n\n const subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>> = {\n start: NOOP,\n asyncStart: NOOP,\n end(data) {\n // The operation settled synchronously (returned or threw)\n // Presence checks because caller can return `undefined` result or throw a falsy value.\n if ('error' in data || 'result' in data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n }\n },\n error(data) {\n // No span was bound for this payload (`getSpan` returned undefined), so there is nothing to\n // annotate and no instrumentation that owns capturing this error.\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n\n annotateSpanError(span, data.error);\n },\n asyncEnd(data) {\n const span = data._sentrySpan;\n if (span && deferSpanEnd?.({ span, data, end: makeDeferredEnd(span, data) })) {\n return;\n }\n endBoundSpan(data, beforeSpanEnd);\n },\n };\n\n handle.channel.subscribe(subscribers);\n\n return {\n channel: handle.channel,\n unbind: () => {\n handle.channel.unsubscribe(subscribers);\n handle.unbind();\n },\n };\n}\n\n/**\n * Bind a span into the channel's async context so it becomes active for the traced operation,\n * without managing its lifecycle. The primitive behind {@link bindTracingChannelToSpan}, which\n * layers span-ending and error handling on top.\n *\n * `getSpan` may return `undefined` to leave the active context untouched for that payload.\n */\nexport function bindSpanToChannelStore<TData extends object>(\n channel: TracingChannel<TData, TData>,\n getSpan: (data: TracingChannelPayloadWithSpan<TData>) => Span | undefined,\n): TracingChannelBindingHandle<TData> {\n // Grabs the tracing channel binding defined by the AsyncContext strategy implementation\n const binding = getAsyncContextStrategy(getMainCarrier()).getTracingChannelBinding?.();\n\n // If no binding, then either the implementer doesn't support tracing channels or there is no active strategy\n // Failure mode here means we would still access the channel and potentially subscribe to it, but parenting will be off.\n if (!binding) {\n DEBUG_BUILD && debug.log('[TracingChannel] Could not access async context binding.');\n\n return {\n channel,\n unbind: NOOP,\n };\n }\n\n // Grab the ALS instance, we don't really care what is in it as long as the AsyncContext strategy can use its value to figure out parenting.\n const asyncLocalStorage = binding.asyncLocalStorage as AsyncLocalStorage<TData>;\n\n // bindStore activates the ALS for the traced call; any getStore() inside it returns the value bound for that context.\n // 1. Produce: Binds the span to the active context via withActiveSpan(span), and returns the store for the active context.\n // 2. Bind: the courier hands that opaque value to channel.start.bindStore(asyncLocalStorage, producer), which runs the traced op inside asyncLocalStorage.run(value, …); it never inspects the value.\n // 3. Read: inside the op, Sentry's scope machinery calls getScopes() → asyncStorage.getStore() on that same ALS, so getCurrentScope/getIsolationScope/getActiveSpan resolve to the scope carrying our span.\n // 4. Nest: any child span started in the traced op parents to that active span.\n channel.start.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n // Stash the caller's store before we swap in the span store, so `asyncStart` can restore it for\n // callback-style channels (see `_sentryCallerStore`).\n data._sentryCallerStore = asyncLocalStorage.getStore();\n\n const span = getSpan(data);\n if (!span) {\n // Leave the active context untouched so nested operations keep parenting to the enclosing span.\n return data._sentryCallerStore as TData;\n }\n data._sentrySpan = span;\n\n return getStoreWithActiveSpan(asyncLocalStorage, span) as TData;\n });\n\n // Restore the caller's context for the async continuation. Only callback-style channels `runStores`\n // `asyncStart` (so the callback runs inside this store). promise channels `publish` it, leaving this\n // inert, their continuation already inherits the caller's context natively.\n channel.asyncStart.bindStore(asyncLocalStorage, (data: TracingChannelPayloadWithSpan<TData>) => {\n return data._sentryCallerStore as TData;\n });\n\n return {\n channel,\n unbind: () => {\n // Removes the stores\n channel.start.unbindStore(asyncLocalStorage);\n channel.asyncStart.unbindStore(asyncLocalStorage);\n },\n };\n}\n\nfunction endBoundSpan<TData extends object>(\n data: TracingChannelPayloadWithSpan<TData>,\n beforeSpanEnd: TracingChannelLifeCycleOptions<TData>['beforeSpanEnd'],\n): void {\n const span = data._sentrySpan;\n if (!span) {\n return;\n }\n beforeSpanEnd?.(span, data);\n span.end();\n}\n\ntype ErrorInfo = {\n message: string | undefined;\n attributes: Record<string, string>;\n};\n\n/**\n * Best-effort message and attribute extraction for thrown/rejected values.\n */\nfunction getErrorInfo(error: unknown): ErrorInfo {\n const errorIsObject = isObjectLike(error);\n const raw = errorIsObject ? ('message' in error ? error.message : undefined) : error;\n\n // Leave the status message unset if not set (e.g. an `AggregateError` from\n // ECONNREFUSED, whose `.message` is empty). Otherwise cast to string.\n const message = raw ? String(raw) : undefined;\n const type = errorIsObject && 'name' in error ? String(error.name) : 'unknown';\n\n return {\n message,\n attributes: {\n [ERROR_TYPE]: type,\n },\n };\n}\n\nfunction getStoreWithActiveSpan(asyncLocalStorage: AsyncLocalStorage<unknown>, span: Span): unknown {\n // Do not make an ignored *child* the active span: no span is emitted for it, so its children and\n // outgoing requests must propagate from the nearest emitted parent instead. An ignored *root* is\n // still activated so its whole subtree is dropped with it. Mirrors core `startSpan` and the OTel\n // context manager (`spanIsIgnored(span) && getRootSpan(span) !== span`).\n if (spanIsIgnored(span) && getRootSpan(span) !== span) {\n return asyncLocalStorage.getStore();\n }\n\n return withActiveSpan(span, () => {\n return asyncLocalStorage.getStore();\n });\n}\n"],"mappings":";;;;AAyFA,MAAM,aAAmB,CAAC;;AAG1B,SAAgB,oBAAuB,IAA4B;CACjE,IAAI;EACF,OAAO,GAAG;CACZ,SAAS,OAAO;EACd,eAAe,MA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B,mBAA+C,MAAqB;CAKlG,IAAI,cAAc,IAAI,KAAK,YAAY,IAAI,MAAM,MAC/C,OAAO,kBAAkB,SAAS;CAGpC,OAAO,eAAe,YAAY;EAChC,OAAO,kBAAkB,SAAS;CACpC,CAAC;AACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/utils.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAIL,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAItC,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAKhF,CAAC;AAcF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,sBAAsB,CAgBxF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAmCpC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CA8C7F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,OAAO,EACtB,aAAa,CAAC,EAAE,sBAAsB,GACrC,IAAI,CAyDN"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/utils.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAIL,0BAA0B,EAC3B,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAItC,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAElF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAKhF,CAAC;AAcF;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,sBAAsB,CAgBxF;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAmCpC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAiD7F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,OAAO,EACtB,aAAa,CAAC,EAAE,sBAAsB,GACrC,IAAI,CAyDN"}
@@ -1 +1 @@
1
- {"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../src/integrations/fastify/instrumentation.ts"],"names":[],"mappings":"AA8XA;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAaxC"}
1
+ {"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../src/integrations/fastify/instrumentation.ts"],"names":[],"mappings":"AAsYA;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAaxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"neon.d.ts","sourceRoot":"","sources":["../../../src/integrations/neon.ts"],"names":[],"mappings":"AAyJA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;CAAsC,CAAC"}
1
+ {"version":3,"file":"neon.d.ts","sourceRoot":"","sources":["../../../src/integrations/neon.ts"],"names":[],"mappings":"AA4KA;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;CAAsC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { SpanAttributes } from '@sentry/core';
1
+ import type { Span, SpanAttributes } from '@sentry/core';
2
2
  export interface PgConnectionParams {
3
3
  database?: string;
4
4
  host?: string;
@@ -16,6 +16,11 @@ export interface PgQuerySpanOptions {
16
16
  * streamable `Submittable` result, so it's the only one that defers span-ending to the emitter.
17
17
  */
18
18
  export declare function bindPgQueryChannel(channelName: string, options: PgQuerySpanOptions): void;
19
+ /**
20
+ * Sets `db.response.returned_rows` from a pg-style result (`{ rowCount, rows }`), or an array of them
21
+ * (one per statement of a multi-statement query), summed. Sets nothing when no count is known.
22
+ */
23
+ export declare function setReturnedRows(span: Span, results: unknown): void;
19
24
  /** The `db.*`/`server.*` attributes for a pg-style set of connection parameters. */
20
25
  export declare function getConnectionAttributes(params: PgConnectionParams): SpanAttributes;
21
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"pg.d.ts","sourceRoot":"","sources":["../../../src/integrations/pg.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAwB,cAAc,EAAE,MAAM,cAAc,CAAC;AA0CzE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAgCD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IAGf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAEzF;AAkHD,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,cAAc,CAQlF;AAsDD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;yBA7N+B,OAAO;;;CA6NI,CAAC"}
1
+ {"version":3,"file":"pg.d.ts","sourceRoot":"","sources":["../../../src/integrations/pg.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAwB,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AA0C/E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAgCD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IAGf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAEzF;AAsHD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAUlE;AA4BD,oFAAoF;AACpF,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,cAAc,CAQlF;AAsDD;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;yBA3Q+B,OAAO;;;CA2QI,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"pino.d.ts","sourceRoot":"","sources":["../../../src/integrations/pino.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAiDpE,KAAK,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AC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC5D,CAAC;AA+GF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;;;wBACN,OAAO,GAAG,IAAI;0BAKZ,OAAO,GAAG,IAAI;CAKpC,CAAC"}
@@ -1,10 +1,7 @@
1
1
  /** Maps the AI SDK `experimental_extract` input and output to the Clairic shape of the `gen_ai.extract` schemas. */
2
+ import type { ExtractRequest } from '@sentry/conventions/attributes';
2
3
  interface ExtractState {
3
- request: {
4
- state?: string;
5
- images?: string[];
6
- documents?: string[];
7
- };
4
+ request: Pick<ExtractRequest, 'state' | 'images' | 'documents'>;
8
5
  /** For each AI SDK state part, the offset of its text in `request.state`, or `'image'` for an image part. */
9
6
  parts: (number | 'image' | undefined)[];
10
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../src/integrations/vercel-ai/extract.ts"],"names":[],"mappings":"AAAA,oHAAoH;AAapH,UAAU,YAAY;IACpB,OAAO,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACrE,6GAA6G;IAC7G,KAAK,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EAAE,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAoC3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAOxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBzB"}
1
+ {"version":3,"file":"extract.d.ts","sourceRoot":"","sources":["../../../../src/integrations/vercel-ai/extract.ts"],"names":[],"mappings":"AAAA,oHAAoH;AAEpH,OAAO,KAAK,EAAiB,cAAc,EAAe,MAAM,gCAAgC,CAAC;AAYjG,UAAU,YAAY;IACpB,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC,CAAC;IAChE,6GAA6G;IAC7G,KAAK,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EAAE,CAAC;CACzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAoC3D;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAOxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBzB"}
@@ -166,6 +166,7 @@ export declare const CHANNELS: {
166
166
  readonly POSTGRESJS_CONNECT: 'orchestrion:postgres:connect';
167
167
  readonly PRISMA_AGGREGATE: 'orchestrion:@prisma/orm-family-sql:aggregate';
168
168
  readonly PRISMA_FIRST: 'orchestrion:@prisma/orm-family-sql:first';
169
+ readonly PRISMA_FIRST_OR_THROW: 'orchestrion:@prisma/orm-family-sql:firstOrThrow';
169
170
  readonly PRISMA_CREATE: 'orchestrion:@prisma/orm-family-sql:create';
170
171
  readonly PRISMA_CREATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:createAndCount';
171
172
  readonly PRISMA_UPSERT: 'orchestrion:@prisma/orm-family-sql:upsert';
@@ -1 +1 @@
1
- {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/channels.ts"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CX,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/channels.ts"],"names":[],"mappings":"AA8CA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CX,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import type { InstrumentationConfig } from '../apmTypes';
2
- export declare const PRISMA_ASYNC_TERMINALS: readonly ['aggregate', 'first', 'create', 'createAndCount', 'upsert', 'update', 'updateAndCount', 'delete', 'deleteAndCount'];
2
+ export declare const PRISMA_ASYNC_TERMINALS: readonly ['aggregate', 'first', 'firstOrThrow', 'create', 'createAndCount', 'upsert', 'update', 'updateAndCount', 'delete', 'deleteAndCount'];
3
3
  export declare const PRISMA_LAZY_TERMINALS: readonly ['all', 'createAll', 'updateAll', 'deleteAll'];
4
4
  export declare const prismaConfig: InstrumentationConfig[];
5
5
  export declare const prismaModuleNames: string[];
6
6
  export declare const prismaChannels: {
7
7
  readonly PRISMA_AGGREGATE: 'orchestrion:@prisma/orm-family-sql:aggregate';
8
8
  readonly PRISMA_FIRST: 'orchestrion:@prisma/orm-family-sql:first';
9
+ readonly PRISMA_FIRST_OR_THROW: 'orchestrion:@prisma/orm-family-sql:firstOrThrow';
9
10
  readonly PRISMA_CREATE: 'orchestrion:@prisma/orm-family-sql:create';
10
11
  readonly PRISMA_CREATE_AND_COUNT: 'orchestrion:@prisma/orm-family-sql:createAndCount';
11
12
  readonly PRISMA_UPSERT: 'orchestrion:@prisma/orm-family-sql:upsert';
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/config/prisma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAUzD,eAAO,MAAM,sBAAsB,YACjC,WAAW,EACX,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,CACR,CAAC;AAIX,eAAO,MAAM,qBAAqB,YAAI,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC;AAY7F,eAAO,MAAM,YAAY,EAAE,qBAAqB,EAG/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAA+B,CAAC;AAE9D,eAAO,MAAM,cAAc;aACzB,gBAAgB,EAAE,8CAA8C;aAChE,YAAY,EAAE,0CAA0C;aACxD,aAAa,EAAE,2CAA2C;aAC1D,uBAAuB,EAAE,mDAAmD;aAC5E,aAAa,EAAE,2CAA2C;aAC1D,aAAa,EAAE,2CAA2C;aAC1D,uBAAuB,EAAE,mDAAmD;aAC5E,aAAa,EAAE,2CAA2C;aAC1D,uBAAuB,EAAE,mDAAmD;aAC5E,UAAU,EAAE,wCAAwC;aACpD,iBAAiB,EAAE,8CAA8C;aACjE,iBAAiB,EAAE,8CAA8C;aACjE,iBAAiB,EAAE,8CAA8C;CACzD,CAAC"}
1
+ {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/config/prisma.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAUzD,eAAO,MAAM,sBAAsB,YACjC,WAAW,EACX,OAAO,EAIP,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,CACR,CAAC;AAIX,eAAO,MAAM,qBAAqB,YAAI,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,CAAU,CAAC;AAY7F,eAAO,MAAM,YAAY,EAAE,qBAAqB,EAG/C,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAA+B,CAAC;AAE9D,eAAO,MAAM,cAAc;aACzB,gBAAgB,EAAE,8CAA8C;aAChE,YAAY,EAAE,0CAA0C;aACxD,qBAAqB,EAAE,iDAAiD;aACxE,aAAa,EAAE,2CAA2C;aAC1D,uBAAuB,EAAE,mDAAmD;aAC5E,aAAa,EAAE,2CAA2C;aAC1D,aAAa,EAAE,2CAA2C;aAC1D,uBAAuB,EAAE,mDAAmD;aAC5E,aAAa,EAAE,2CAA2C;aAC1D,uBAAuB,EAAE,mDAAmD;aAC5E,UAAU,EAAE,wCAAwC;aACpD,iBAAiB,EAAE,8CAA8C;aACjE,iBAAiB,EAAE,8CAA8C;aACjE,iBAAiB,EAAE,8CAA8C;CACzD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tracing-channel.d.ts","sourceRoot":"","sources":["../../src/tracing-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAe7E,MAAM,MAAM,6BAA6B,CAAC,KAAK,SAAS,MAA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G,SAAS,CAOjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS,MAAM,EAC3D,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EACrC,OAAO,EAAE,CAAC,IAAI,EAAE,6BAA6B,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,SAAS,EACzE,IAAI,CAAC,EAAE,8BAA8B,CAAC,KAAK,CAAC,GAC3C,2BAA2B,CAAC,KAAK,CAAC,CA8FpC;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,SAAS,MAAM,EACzD,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EACrC,OAAO,EAAE,CAAC,IAAI,EAAE,6BAA6B,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,SAAS,GACxE,2BAA2B,CAAC,KAAK,CAAC,CAqDpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/server-utils",
3
- "version": "11.21.0",
3
+ "version": "11.22.0",
4
4
  "description": "Server Utilities for all Sentry JavaScript SDKs",
5
5
  "repository": {
6
6
  "type": "git",
@@ -105,13 +105,13 @@
105
105
  },
106
106
  "dependencies": {
107
107
  "@opentelemetry/api": "^1.9.1",
108
- "@sentry/conventions": "^0.36.0",
109
- "@sentry/core": "11.21.0"
108
+ "@sentry/conventions": "^0.37.0",
109
+ "@sentry/core": "11.22.0"
110
110
  },
111
111
  "devDependencies": {
112
112
  "@apm-js-collab/code-transformer-bundler-plugins": "^0.7.6",
113
113
  "@neondatabase/serverless": "1.2.0",
114
- "@sentry-internal/rollup-utils": "11.21.0",
114
+ "@sentry-internal/rollup-utils": "11.22.0",
115
115
  "@types/node": "^20.19.0",
116
116
  "meriyah": "^6.1.4",
117
117
  "vite": "^8.3.6",