diff --git a/packages/bun/src/plugin.ts b/packages/bun/src/plugin.ts index a3ed11f4f72d..8f8911509c1d 100644 --- a/packages/bun/src/plugin.ts +++ b/packages/bun/src/plugin.ts @@ -1,5 +1,5 @@ /** - * orchestrion code-transform plugin for Bun's bundler (`bun build`). + * Sentry code-transform plugin for Bun's bundler (`bun build`). * * Usage: * @@ -17,7 +17,7 @@ * * When https://github.com/oven-sh/bun/pull/31770 lands, we can revisit. * - * Until then, Bun apps must bundle to get orchestrion instrumentation. In dev + * Until then, Bun apps must bundle to get build-time instrumentation. In dev * (ie, `bun run`) there is simply no instrumentation, which is clearer than * partial/inconsistent coverage. * @@ -52,7 +52,7 @@ interface BunPluginBuilder { } /** - * Returns the orchestrion code-transform plugin for Bun's bundler, configured + * Returns the Sentry code-transform plugin for Bun's bundler, configured * with the central `SENTRY_INSTRUMENTATIONS`. The plugin injects * `diagnostics_channel.tracingChannel` calls into the instrumented libraries as * `bun build` bundles them — plus, via the module-injected transform, the diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index 04cef76d1902..703b25e10e62 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -960,7 +960,7 @@ export abstract class Client { public on(hook: 'stopUIProfiler', callback: () => void): () => void; /** - * A hook that is called when an orchestrion-instrumented module is injected — + * A hook that is called when an instrumented module is injected — * at runtime by the module hook, or at load of a bundler-transformed module. * Channel-based integrations use it to subscribe their diagnostics-channel * listeners lazily, only once the module they instrument is actually loaded. @@ -1238,7 +1238,7 @@ export abstract class Client { public emit(hook: 'stopUIProfiler'): void; /** - * Emit a hook when an orchestrion-instrumented module is injected (runtime + * Emit a hook when an instrumented module is injected (runtime * module hook or bundler-transformed module load). */ public emit(hook: 'orchestrion.module-injected', moduleName: string): void; diff --git a/packages/core/src/integrations/postgresjs.ts b/packages/core/src/integrations/postgresjs.ts index 5418481ee57f..efafcbc8f087 100644 --- a/packages/core/src/integrations/postgresjs.ts +++ b/packages/core/src/integrations/postgresjs.ts @@ -400,7 +400,7 @@ export function _sanitizeSqlQuery(sqlQuery: string | undefined): string { /** * Sets connection context attributes on a span. * - * @internal Exported for the orchestrion (diagnostics-channel) integration. + * @internal Exported for the diagnostics-channel integration. */ export function _setConnectionAttributes(span: Span, connectionContext: PostgresConnectionContext | undefined): void { if (!connectionContext) { @@ -425,7 +425,7 @@ export function _setConnectionAttributes(span: Span, connectionContext: Postgres /** * Extracts DB operation name from SQL query and sets it on the span. * - * @internal Exported for the orchestrion (diagnostics-channel) integration. + * @internal Exported for the diagnostics-channel integration. */ export function _setOperationName(span: Span, sanitizedQuery: string | undefined, command?: string): void { if (command) { @@ -443,7 +443,7 @@ export function _setOperationName(span: Span, sanitizedQuery: string | undefined * Builds a {@link PostgresConnectionContext} from postgres.js' parsed options * (which store `host`/`port` as arrays). Defaults to 'localhost'/5432. * - * @internal Exported for the orchestrion (diagnostics-channel) integration. + * @internal Exported for the diagnostics-channel integration. */ export function _buildConnectionContext(options: { host?: string[]; diff --git a/packages/core/src/utils/worldwide.ts b/packages/core/src/utils/worldwide.ts index e3cb23d5b4a0..205f699fd98e 100644 --- a/packages/core/src/utils/worldwide.ts +++ b/packages/core/src/utils/worldwide.ts @@ -56,7 +56,7 @@ export type InternalGlobal = { _sentryModuleMetadata?: Record; _sentryWrappedDepth?: number; /** - * Orchestrion bundler and runtime detection. + * Bundler and runtime instrumentation detection. */ __SENTRY_ORCHESTRION__?: { /** Empty array signifies runtime hooked */ diff --git a/packages/deno/README.md b/packages/deno/README.md index 3e868bb6bd62..d0679bb6ca0c 100644 --- a/packages/deno/README.md +++ b/packages/deno/README.md @@ -60,10 +60,8 @@ Sentry.captureEvent({ ## Auto-instrumentation (experimental) Some libraries (e.g. `mysql`) don't emit tracing signals on their -own. To instrument them, Sentry uses -[orchestrion](https://github.com/apm-js-collab/tracing-hooks) to -transform them at load time so they publish to -`node:diagnostics_channel`. +own. To instrument them, Sentry transforms them at load time so they +publish to `node:diagnostics_channel`. Use the `--import` or `--preload` argument to `deno run` to enable these instrumentations. diff --git a/packages/nestjs/src/integrations/orchestrion-subscriber.ts b/packages/nestjs/src/integrations/orchestrion-subscriber.ts index 2d72eb28e5e8..bb3221002b18 100644 --- a/packages/nestjs/src/integrations/orchestrion-subscriber.ts +++ b/packages/nestjs/src/integrations/orchestrion-subscriber.ts @@ -122,7 +122,7 @@ export function subscribeToNestChannels(): void { return; } - DEBUG_BUILD && debug.log('[orchestrion:nestjs] subscribing to @nestjs channels'); + DEBUG_BUILD && debug.log('[instrumentation:nestjs] subscribing to @nestjs channels'); // App-creation span: `bindTracingChannelToSpan` opens the span on // `start`, makes it the active context for the bootstrap, and ends it diff --git a/packages/node/src/bundler-plugin/esbuild.ts b/packages/node/src/bundler-plugin/esbuild.ts index c58515fa6a20..f22701176e4a 100644 --- a/packages/node/src/bundler-plugin/esbuild.ts +++ b/packages/node/src/bundler-plugin/esbuild.ts @@ -1,12 +1,14 @@ import { sentryEsbuildPlugin as sentryEsbuildBundlerPlugin } from '@sentry/bundler-plugins/esbuild'; import type { SentryEsbuildPluginOptions as SentryEsbuildPluginOptionsBase } from '@sentry/bundler-plugins/esbuild'; +import type { InstrumentationConfig } from '@sentry/server-utils'; import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/esbuild'; +import type { EsbuildPlugin } from '@sentry/server-utils/orchestrion/esbuild'; export type SentryEsbuildPluginOptions = SentryEsbuildPluginOptionsBase & { /** * @ignore This is for internal use only when this plugin is consumed by a framework SDK */ - instrumentations?: NonNullable[0]>['instrumentations']; + instrumentations?: InstrumentationConfig[]; /** * Automatic instrumentation of server-side dependencies at build time. @@ -18,8 +20,6 @@ export type SentryEsbuildPluginOptions = SentryEsbuildPluginOptionsBase & { buildTimeInstrumentation?: boolean; }; -type EsbuildPlugin = ReturnType; - /** * esbuild plugin that bundles the Sentry esbuild bundler plugin (source maps, * release injection, …) together with the code transformer diff --git a/packages/node/src/bundler-plugin/rollup.ts b/packages/node/src/bundler-plugin/rollup.ts index 4258252e473c..5cff17b76f67 100644 --- a/packages/node/src/bundler-plugin/rollup.ts +++ b/packages/node/src/bundler-plugin/rollup.ts @@ -1,12 +1,14 @@ import { sentryRollupPlugin as sentryRollupBundlerPlugin } from '@sentry/bundler-plugins/rollup'; import type { SentryRollupPluginOptions as SentryRollupPluginOptionsBase } from '@sentry/bundler-plugins/rollup'; +import type { InstrumentationConfig } from '@sentry/server-utils'; import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup'; +import type { RollupPlugin } from '@sentry/server-utils/orchestrion/rollup'; export type SentryRollupPluginOptions = SentryRollupPluginOptionsBase & { /** * @ignore This is for internal use only when this plugin is consumed by a framework SDK */ - instrumentations?: NonNullable[0]>['instrumentations']; + instrumentations?: InstrumentationConfig[]; /** * Automatic instrumentation of server-side dependencies at build time. @@ -18,8 +20,6 @@ export type SentryRollupPluginOptions = SentryRollupPluginOptionsBase & { buildTimeInstrumentation?: boolean; }; -type RollupPlugin = ReturnType; - /** * Rollup plugin that bundles the Sentry Rollup bundler plugin (source maps, * release injection, bundle size optimizations, …) together with the diff --git a/packages/node/src/bundler-plugin/vite.ts b/packages/node/src/bundler-plugin/vite.ts index 81c5ce5f2aa9..74a54e6ce17b 100644 --- a/packages/node/src/bundler-plugin/vite.ts +++ b/packages/node/src/bundler-plugin/vite.ts @@ -1,12 +1,14 @@ import { sentryVitePlugin as sentryViteBundlerPlugin } from '@sentry/bundler-plugins/vite'; import type { SentryVitePluginOptions as SentryVitePluginOptionsBase } from '@sentry/bundler-plugins/vite'; +import type { InstrumentationConfig } from '@sentry/server-utils'; import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/vite'; +import type { VitePlugin } from '@sentry/server-utils/orchestrion/vite'; export type SentryVitePluginOptions = SentryVitePluginOptionsBase & { /** * @ignore This is for internal use only when this plugin is consumed by a framework SDK */ - instrumentations?: NonNullable[0]>['instrumentations']; + instrumentations?: InstrumentationConfig[]; /** * Automatic instrumentation of server-side dependencies at build time. @@ -18,8 +20,6 @@ export type SentryVitePluginOptions = SentryVitePluginOptionsBase & { buildTimeInstrumentation?: boolean; }; -type VitePlugin = ReturnType; - /** * Vite plugin that bundles the Sentry Vite bundler plugin (source maps, release * injection, bundle size optimizations, …) together with the code diff --git a/packages/node/src/bundler-plugin/webpack.ts b/packages/node/src/bundler-plugin/webpack.ts index fec2b4d1b254..f40d5ffd001c 100644 --- a/packages/node/src/bundler-plugin/webpack.ts +++ b/packages/node/src/bundler-plugin/webpack.ts @@ -1,12 +1,13 @@ import { sentryWebpackPlugin as sentryWebpackBundlerPlugin } from '@sentry/bundler-plugins/webpack'; import type { SentryWebpackPluginOptions as SentryWebpackPluginOptionsBase } from '@sentry/bundler-plugins/webpack'; +import type { InstrumentationConfig } from '@sentry/server-utils'; import { sentryOrchestrionWebpackPlugin } from '@sentry/server-utils/orchestrion/webpack'; export type SentryWebpackPluginOptions = SentryWebpackPluginOptionsBase & { /** * @ignore This is for internal use only when this plugin is consumed by a framework SDK */ - instrumentations?: NonNullable[0]>['instrumentations']; + instrumentations?: InstrumentationConfig[]; /** * Automatic instrumentation of server-side dependencies at build time. diff --git a/packages/server-utils/src/integrations/amqplib.ts b/packages/server-utils/src/integrations/amqplib.ts index 2ce8b9d8fb91..43e2f7701ac4 100644 --- a/packages/server-utils/src/integrations/amqplib.ts +++ b/packages/server-utils/src/integrations/amqplib.ts @@ -624,10 +624,10 @@ function getHeaderAsString(headers: Record | undefined, key: st } /** - * Orchestrion-driven `amqplib` integration. + * Diagnostics-channel-based `amqplib` integration. * - * Subscribes to the `orchestrion:amqplib:*` diagnostics_channels that the orchestrion code transform - * injects into `amqplib`'s channel/connection methods. Requires the orchestrion runtime hook or + * Subscribes to the `orchestrion:amqplib:*` diagnostics_channels that Sentry's code transform + * injects into `amqplib`'s channel/connection methods. Requires the Sentry runtime hook or * bundler plugin to be active. */ export const amqplibIntegration = defineIntegration(_amqplibIntegration); diff --git a/packages/server-utils/src/integrations/anthropic.ts b/packages/server-utils/src/integrations/anthropic.ts index 6717be01fe86..1b6bd0c51aed 100644 --- a/packages/server-utils/src/integrations/anthropic.ts +++ b/packages/server-utils/src/integrations/anthropic.ts @@ -157,8 +157,8 @@ function wrapStreamResult( } /** - * Orchestrion-driven Anthropic integration. Subscribes to the `orchestrion:@anthropic-ai/sdk:*` + * Diagnostics-channel-based Anthropic integration. Subscribes to the `orchestrion:@anthropic-ai/sdk:*` * diagnostics_channels injected into the SDK's chat (`messages`/`completions`/beta `messages`) and - * `messages.stream()` methods, so it requires the orchestrion runtime hook or bundler plugin. + * `messages.stream()` methods, so it requires the Sentry runtime hook or bundler plugin. */ export const anthropicAIIntegration = defineIntegration(_anthropicAIIntegration); diff --git a/packages/server-utils/src/integrations/aws-sdk/index.ts b/packages/server-utils/src/integrations/aws-sdk/index.ts index 44860a3a69e0..1f6289cbb9f8 100644 --- a/packages/server-utils/src/integrations/aws-sdk/index.ts +++ b/packages/server-utils/src/integrations/aws-sdk/index.ts @@ -237,11 +237,11 @@ function instrumentAwsSdk(servicesExtensions: ServicesExtensions): void { } /** - * Orchestrion-driven aws-sdk (v3) integration. + * Diagnostics-channel-based aws-sdk (v3) integration. * * Subscribes to the `orchestrion:@smithy/smithy-client:send` (and equivalent) diagnostics_channel - * the orchestrion code transform injects into the AWS SDK's smithy `Client.prototype.send`, emitting + * Sentry's code transform injects into the AWS SDK's smithy `Client.prototype.send`, emitting * spans identical to the OTel `@opentelemetry/instrumentation-aws-sdk` integration. Requires the - * orchestrion runtime hook or bundler plugin. + * Sentry runtime hook or bundler plugin. */ export const awsIntegration = defineIntegration(_awsIntegration); diff --git a/packages/server-utils/src/integrations/aws-sdk/services/MessageAttributes.ts b/packages/server-utils/src/integrations/aws-sdk/services/MessageAttributes.ts index c282cd3d3f43..87b2983baa49 100644 --- a/packages/server-utils/src/integrations/aws-sdk/services/MessageAttributes.ts +++ b/packages/server-utils/src/integrations/aws-sdk/services/MessageAttributes.ts @@ -43,7 +43,7 @@ export function injectPropagationContext( } else { DEBUG_BUILD && debug.warn( - '[orchestrion:aws-sdk] cannot set trace propagation on SQS/SNS message due to maximum amount of MessageAttributes', + '[instrumentation:aws-sdk] cannot set trace propagation on SQS/SNS message due to maximum amount of MessageAttributes', ); } return attributes; diff --git a/packages/server-utils/src/integrations/aws-sdk/services/bedrock-runtime.ts b/packages/server-utils/src/integrations/aws-sdk/services/bedrock-runtime.ts index c2b39d55c07f..7be3d66c0e5d 100644 --- a/packages/server-utils/src/integrations/aws-sdk/services/bedrock-runtime.ts +++ b/packages/server-utils/src/integrations/aws-sdk/services/bedrock-runtime.ts @@ -419,7 +419,7 @@ function parseChunk(bytes?: Uint8Array): ParsedChunk { const str = Buffer.from(bytes).toString('utf-8'); return JSON.parse(str); } catch (err) { - DEBUG_BUILD && debug.warn('[orchestrion:aws-sdk] failed to parse streamed bedrock chunk', err); + DEBUG_BUILD && debug.warn('[instrumentation:aws-sdk] failed to parse streamed bedrock chunk', err); return null; } } diff --git a/packages/server-utils/src/integrations/aws-sdk/services/lambda.ts b/packages/server-utils/src/integrations/aws-sdk/services/lambda.ts index c9fd1534fbaa..7b88a339c044 100644 --- a/packages/server-utils/src/integrations/aws-sdk/services/lambda.ts +++ b/packages/server-utils/src/integrations/aws-sdk/services/lambda.ts @@ -71,14 +71,14 @@ function injectLambdaPropagationContext(clientContext: string | undefined, span: if (encodedClientContext.length > 3583) { DEBUG_BUILD && debug.warn( - '[orchestrion:aws-sdk] cannot set trace propagation on lambda invoke parameters due to ClientContext length limitations.', + '[instrumentation:aws-sdk] cannot set trace propagation on lambda invoke parameters due to ClientContext length limitations.', ); return clientContext; } return encodedClientContext; } catch (e) { - DEBUG_BUILD && debug.log('[orchestrion:aws-sdk] failed to set trace propagation on lambda ClientContext', e); + DEBUG_BUILD && debug.log('[instrumentation:aws-sdk] failed to set trace propagation on lambda ClientContext', e); return clientContext; } } diff --git a/packages/server-utils/src/integrations/dataloader.ts b/packages/server-utils/src/integrations/dataloader.ts index 26875652bc83..6fb57c2491d9 100644 --- a/packages/server-utils/src/integrations/dataloader.ts +++ b/packages/server-utils/src/integrations/dataloader.ts @@ -117,7 +117,7 @@ const _dataloaderIntegration = (() => { return; } - DEBUG_BUILD && debug.log('[orchestrion:dataloader] subscribing to dataloader tracing channels'); + DEBUG_BUILD && debug.log('[instrumentation:dataloader] subscribing to dataloader tracing channels'); waitForTracingChannelBinding(() => { subscribeConstruct(); @@ -197,10 +197,10 @@ function startInactiveSpanFor(loader: DataLoaderInstance | undefined, operation: } /** - * Orchestrion-driven `dataloader` integration. + * Diagnostics-channel-based `dataloader` integration. * - * Subscribes to the `orchestrion:dataloader:*` diagnostics_channels that the orchestrion code - * transform injects into `dataloader`'s constructor and prototype methods. Requires the orchestrion + * Subscribes to the `orchestrion:dataloader:*` diagnostics_channels that Sentry's code + * transform injects into `dataloader`'s constructor and prototype methods. Requires the Sentry * runtime hook or bundler plugin to be active. */ export const dataloaderIntegration = defineIntegration(_dataloaderIntegration); diff --git a/packages/server-utils/src/integrations/express/index.ts b/packages/server-utils/src/integrations/express/index.ts index 94009c3a85ec..52598014408d 100644 --- a/packages/server-utils/src/integrations/express/index.ts +++ b/packages/server-utils/src/integrations/express/index.ts @@ -23,15 +23,15 @@ const _expressIntegration = ((options: ExpressIntegrationOptions = {}) => { }) satisfies IntegrationFn; /** - * Orchestrion-driven Express integration. + * Diagnostics-channel-based Express integration. * * Subscribes to the `orchestrion:express:handle` (Express v4) and * `orchestrion:router:handle` (Express v5, via the `router` package) - * diagnostics_channels that the orchestrion code transform injects into the + * diagnostics_channels that Sentry's code transform injects into the * routing layer's request handler (`Layer.prototype.handle_request` / * `handleRequest`). One span is opened per layer invocation — producing the * same spans as the OTel Express instrumentation. * - * Requires the orchestrion runtime hook or bundler plugin to be active. + * Requires the Sentry runtime hook or bundler plugin to be active. */ export const expressIntegration = defineIntegration(_expressIntegration); diff --git a/packages/server-utils/src/integrations/express/instrumentation.ts b/packages/server-utils/src/integrations/express/instrumentation.ts index 74c7f7a5e1d5..0846e5f74880 100644 --- a/packages/server-utils/src/integrations/express/instrumentation.ts +++ b/packages/server-utils/src/integrations/express/instrumentation.ts @@ -207,7 +207,7 @@ function getSpanForLayer(data: HandleChannelContext, options: ExpressIntegration } else { DEBUG_BUILD && debug.warn( - '[orchestrion:express] Isolation scope is still default isolation scope - skipping transaction name', + '[instrumentation:express] Isolation scope is still default isolation scope - skipping transaction name', ); } } diff --git a/packages/server-utils/src/integrations/firebase/index.ts b/packages/server-utils/src/integrations/firebase/index.ts index ea57f5a1075e..a1edee79859e 100644 --- a/packages/server-utils/src/integrations/firebase/index.ts +++ b/packages/server-utils/src/integrations/firebase/index.ts @@ -16,11 +16,11 @@ const _firebaseIntegration = (() => { }) satisfies IntegrationFn; /** - * Orchestrion-driven firebase integration. + * Diagnostics-channel-based firebase integration. * * Subscribes to the `orchestrion:@firebase/firestore:*` and `orchestrion:firebase-functions:*` - * diagnostics_channels the orchestrion code transform injects into firestore's `addDoc`/`getDocs`/ + * diagnostics_channels Sentry's code transform injects into firestore's `addDoc`/`getDocs`/ * `setDoc`/`deleteDoc` and firebase-functions' `onX` registration functions, emitting spans identical - * to the OTel integration. Requires the orchestrion runtime hook or bundler plugin. + * to the OTel integration. Requires the Sentry runtime hook or bundler plugin. */ export const firebaseIntegration = defineIntegration(_firebaseIntegration); diff --git a/packages/server-utils/src/integrations/generic-pool.ts b/packages/server-utils/src/integrations/generic-pool.ts index ff5ea3b80799..5f83615992f1 100644 --- a/packages/server-utils/src/integrations/generic-pool.ts +++ b/packages/server-utils/src/integrations/generic-pool.ts @@ -26,10 +26,10 @@ const _genericPoolIntegration = (() => { }) satisfies IntegrationFn; /** - * Orchestrion-driven generic-pool integration. Subscribes to + * Diagnostics-channel-based generic-pool integration. Subscribes to * `orchestrion:generic-pool:acquire` (injected into `generic-pool/lib/Pool.js`'s * `Pool.prototype.acquire`). Creates a `generic-pool.acquire` span for each - * acquisition. Requires the orchestrion runtime hook or bundler plugin. + * acquisition. Requires the Sentry runtime hook or bundler plugin. */ export const genericPoolIntegration = defineIntegration(_genericPoolIntegration); diff --git a/packages/server-utils/src/integrations/google-genai.ts b/packages/server-utils/src/integrations/google-genai.ts index de03c6f190da..9ae699fbb001 100644 --- a/packages/server-utils/src/integrations/google-genai.ts +++ b/packages/server-utils/src/integrations/google-genai.ts @@ -148,10 +148,10 @@ function wrapStreamResult(span: Span, data: GoogleGenAIChannelContext, options: } /** - * Orchestrion-driven Google GenAI integration. Subscribes to the + * Diagnostics-channel-based Google GenAI integration. Subscribes to the * `orchestrion:@google/genai:*` diagnostics_channels injected into the SDK's `Models` * (`generateContent`/`generateContentStream`/`embedContent`) and `Chat` - * (`sendMessage`/`sendMessageStream`) methods, so it requires the orchestrion runtime hook or + * (`sendMessage`/`sendMessageStream`) methods, so it requires the Sentry runtime hook or * bundler plugin. */ export const googleGenAIIntegration = defineIntegration(_googleGenAIIntegration); diff --git a/packages/server-utils/src/integrations/hapi.ts b/packages/server-utils/src/integrations/hapi.ts index da6182bc83bd..0084ad9a1bf1 100644 --- a/packages/server-utils/src/integrations/hapi.ts +++ b/packages/server-utils/src/integrations/hapi.ts @@ -63,8 +63,8 @@ function instrumentHapi(): void { } /** - * Orchestrion-driven hapi integration. Subscribes to the + * Diagnostics-channel-based hapi integration. Subscribes to the * `orchestrion:@hapi/hapi:route` / `:ext` channels injected into `@hapi/hapi`'s - * `lib/server.js`. Requires the orchestrion runtime hook or bundler plugin. + * `lib/server.js`. Requires the Sentry runtime hook or bundler plugin. */ export const hapiIntegration = defineIntegration(_hapiIntegration); diff --git a/packages/server-utils/src/integrations/kafkajs/index.ts b/packages/server-utils/src/integrations/kafkajs/index.ts index f3d8e78e47b9..21d08cb536f0 100644 --- a/packages/server-utils/src/integrations/kafkajs/index.ts +++ b/packages/server-utils/src/integrations/kafkajs/index.ts @@ -96,11 +96,11 @@ function instrumentKafkajs(): void { } /** - * Orchestrion-driven kafkajs integration. + * Diagnostics-channel-based kafkajs integration. * - * Subscribes to the `orchestrion:kafkajs:*` diagnostics_channels that the orchestrion code transform + * Subscribes to the `orchestrion:kafkajs:*` diagnostics_channels that Sentry's code transform * injects into `kafkajs`'s `producer/messageProducer.js` (`sendBatch`) and `consumer/index.js` (`run`). - * Requires the orchestrion runtime hook or bundler plugin to be active. + * Requires the Sentry runtime hook or bundler plugin to be active. * * Known limitation vs. the OTel integration it replaces: the wrapping producer-`transaction` span is * not emitted (the transformer can't replace `transaction()`'s return value to patch commit/abort). diff --git a/packages/server-utils/src/integrations/knex.ts b/packages/server-utils/src/integrations/knex.ts index 2928f66bd339..617746fc663b 100644 --- a/packages/server-utils/src/integrations/knex.ts +++ b/packages/server-utils/src/integrations/knex.ts @@ -109,7 +109,7 @@ const _knexIntegration = (() => { return; } - DEBUG_BUILD && debug.log(`[orchestrion:knex] subscribing to channel "${CHANNELS.KNEX_QUERY}"`); + DEBUG_BUILD && debug.log(`[instrumentation:knex] subscribing to channel "${CHANNELS.KNEX_QUERY}"`); waitForTracingChannelBinding(() => { subscribeBuilder(CHANNELS.KNEX_QUERY_BUILDER); @@ -306,10 +306,10 @@ function extractPortFromConnectionString(connectionString: string | undefined): } /** - * Orchestrion-driven knex integration. + * Diagnostics-channel-based knex integration. * - * Subscribes to the `orchestrion:knex:*` diagnostics_channels that the orchestrion code transform + * Subscribes to the `orchestrion:knex:*` diagnostics_channels that Sentry's code transform * injects into knex's `Runner.query` (span) and `Client.queryBuilder`/`schemaBuilder`/`raw` (parent-span - * bookkeeping). Requires the orchestrion runtime hook or bundler plugin to be active. + * bookkeeping). Requires the Sentry runtime hook or bundler plugin to be active. */ export const knexIntegration = defineIntegration(_knexIntegration); diff --git a/packages/server-utils/src/integrations/koa.ts b/packages/server-utils/src/integrations/koa.ts index 77bb6bbec64d..b6caf1e8f647 100644 --- a/packages/server-utils/src/integrations/koa.ts +++ b/packages/server-utils/src/integrations/koa.ts @@ -228,9 +228,9 @@ function getMiddlewareMetadata( } /** - * Orchestrion-driven koa integration. Subscribes to the + * Diagnostics-channel-based koa integration. Subscribes to the * `orchestrion:koa:use` channel injected into `Application.prototype.use` and * wraps each registered middleware/router layer in a span-creating proxy. - * Requires the orchestrion runtime hook or bundler plugin. + * Requires the Sentry runtime hook or bundler plugin. */ export const koaIntegration = defineIntegration(_koaIntegration); diff --git a/packages/server-utils/src/integrations/langchain.ts b/packages/server-utils/src/integrations/langchain.ts index e3b1cb181a88..562894882c82 100644 --- a/packages/server-utils/src/integrations/langchain.ts +++ b/packages/server-utils/src/integrations/langchain.ts @@ -111,8 +111,8 @@ function createEmbeddingsSpan(data: EmbeddingsChannelContext, options: LangChain } /** - * Orchestrion-driven LangChain integration. Subscribes to the diagnostics_channels + * Diagnostics-channel-based LangChain integration. Subscribes to the diagnostics_channels * injected into `@langchain/core`'s `BaseChatModel` (to inject the Sentry callback handler) and into - * `@langchain/openai`'s embedding methods, so it requires the orchestrion runtime hook or bundler plugin. + * `@langchain/openai`'s embedding methods, so it requires the Sentry runtime hook or bundler plugin. */ export const langChainIntegration = defineIntegration(_langChainIntegration); diff --git a/packages/server-utils/src/integrations/langgraph.ts b/packages/server-utils/src/integrations/langgraph.ts index 15245a4f19f6..124260fe4029 100644 --- a/packages/server-utils/src/integrations/langgraph.ts +++ b/packages/server-utils/src/integrations/langgraph.ts @@ -76,7 +76,7 @@ function instrumentLanggraph(options: LangGraphOptions): void { wrapToolsWithSpans(params.tools, resolvedOptions, extractAgentNameFromParams(args) ?? undefined); } } catch (error) { - DEBUG_BUILD && debug.error('[orchestrion:langgraph] failed to wrap createReactAgent tools', error); + DEBUG_BUILD && debug.error('[instrumentation:langgraph] failed to wrap createReactAgent tools', error); } }); reactAgentChannel.end.subscribe(message => { @@ -128,8 +128,8 @@ function wrapCompiledGraphInvoke( } /** - * Orchestrion-driven LangGraph integration. Subscribes to the diagnostics_channels + * Diagnostics-channel-based LangGraph integration. Subscribes to the diagnostics_channels * injected into `@langchain/langgraph`'s `StateGraph.compile` and `createReactAgent`, so it requires - * the orchestrion runtime hook or bundler plugin. + * the Sentry runtime hook or bundler plugin. */ export const langGraphIntegration = defineIntegration(_langGraphIntegration); diff --git a/packages/server-utils/src/integrations/lru-memoizer.ts b/packages/server-utils/src/integrations/lru-memoizer.ts index 80d6b682d5df..070d431bea99 100644 --- a/packages/server-utils/src/integrations/lru-memoizer.ts +++ b/packages/server-utils/src/integrations/lru-memoizer.ts @@ -32,9 +32,9 @@ function instrumentLruMemoizer(): void { } /** - * Orchestrion-driven lru-memoizer integration. Subscribes to + * Diagnostics-channel-based lru-memoizer integration. Subscribes to * `orchestrion:lru-memoizer:load` (injected into `lru-memoizer/lib/async.js`'s * `memoizedFunction`). Creates no spans; only re-runs the memoized callback with the - * caller's scope. Requires the orchestrion runtime hook or bundler plugin. + * caller's scope. Requires the Sentry runtime hook or bundler plugin. */ export const lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration); diff --git a/packages/server-utils/src/integrations/mongodb/index.ts b/packages/server-utils/src/integrations/mongodb/index.ts index e5e9754d3d13..777764554f00 100644 --- a/packages/server-utils/src/integrations/mongodb/index.ts +++ b/packages/server-utils/src/integrations/mongodb/index.ts @@ -168,11 +168,11 @@ function bindV3(channelName: string, extract: (args: unknown[]) => V3CallInfo | } /** - * Orchestrion-driven mongodb integration. + * Diagnostics-channel-based mongodb integration. * * Reproduces the vendored `@opentelemetry/instrumentation-mongodb` span shape * (legacy db/net semantic conventions, `mongodb.` names, scrubbed * `db.statement`) via the `orchestrion:mongodb:*` diagnostics_channels - * injected by the orchestrion code transform. + * injected by Sentry's code transform. */ export const mongoIntegration = defineIntegration(_mongoIntegration); diff --git a/packages/server-utils/src/integrations/mongoose/index.ts b/packages/server-utils/src/integrations/mongoose/index.ts index a655f27d523e..d08ffb1e0a14 100644 --- a/packages/server-utils/src/integrations/mongoose/index.ts +++ b/packages/server-utils/src/integrations/mongoose/index.ts @@ -181,12 +181,12 @@ function stashParentSpan(self: object | undefined): void { } /** - * Orchestrion-driven mongoose integration. + * Diagnostics-channel-based mongoose integration. * * Reproduces the vendored `@opentelemetry/instrumentation-mongoose` span * shape (legacy db/net semantic conventions, `mongoose..` names, * build-time span parenting) via the `orchestrion:mongoose:*` - * diagnostics_channels injected into mongoose `< 9.7` by the orchestrion + * diagnostics_channels injected into mongoose `< 9.7` by Sentry's * code transform. For mongoose `>= 9.7` it also drives the native * diagnostics_channel subscription, so this single integration covers every * supported version once it replaces the OTel one. diff --git a/packages/server-utils/src/integrations/mysql.ts b/packages/server-utils/src/integrations/mysql.ts index fc2d4ff69dd1..a87c9854c859 100644 --- a/packages/server-utils/src/integrations/mysql.ts +++ b/packages/server-utils/src/integrations/mysql.ts @@ -164,11 +164,11 @@ function getJDBCString(host: string | undefined, port: number | undefined, datab } /** - * Orchestrion-driven mysql integration. + * Diagnostics-channel-based mysql integration. * - * Subscribes to the `orchestrion:mysql:query` diagnostics_channel that the - * orchestrion code transform injects into `mysql/lib/Connection.js`'s - * `Connection.prototype.query`. Requires the orchestrion runtime hook or + * Subscribes to the `orchestrion:mysql:query` diagnostics_channel that + * Sentry's code transform injects into `mysql/lib/Connection.js`'s + * `Connection.prototype.query`. Requires the Sentry runtime hook or * bundler plugin to be active. */ export const mysqlIntegration = defineIntegration(_mysqlIntegration); diff --git a/packages/server-utils/src/integrations/mysql2/index.ts b/packages/server-utils/src/integrations/mysql2/index.ts index 7232b984c889..f39b0613c551 100644 --- a/packages/server-utils/src/integrations/mysql2/index.ts +++ b/packages/server-utils/src/integrations/mysql2/index.ts @@ -57,7 +57,7 @@ interface Mysql2Connection { } /** - * Orchestrion-driven mysql2 integration. + * Diagnostics-channel-based mysql2 integration. * * Subscribes to: * - the `orchestrion:mysql2:query`/`:execute` channels the code transform @@ -65,7 +65,7 @@ interface Mysql2Connection { * - mysql2's native `node:diagnostics_channel` tracing channels * (mysql2 `>= 3.20.0`), which the transform intentionally leaves alone. * - * The two version ranges never overlap, so no query is double-counted. Requires the orchestrion + * The two version ranges never overlap, so no query is double-counted. Requires the Sentry * runtime hook or bundler plugin to be active. */ function instrumentMysql2Orchestrion(): void { @@ -151,7 +151,7 @@ const _mysql2Integration = (() => { }) satisfies IntegrationFn; /** - * Orchestrion-driven mysql2 integration. + * Diagnostics-channel-based mysql2 integration. * * Adds Sentry tracing instrumentation for the * [mysql2](https://www.npmjs.com/package/mysql2) library via diagnostics-channel @@ -160,7 +160,7 @@ const _mysql2Integration = (() => { * * Known limitation vs. older OTel integration it replaced: the callback-less * streaming form (`connection.query(sql).on('result', ...)`) is not traced. - * See the `mysql2` orchestrion config for why. The callback and promise forms + * See the `mysql2` transform config for why. The callback and promise forms * (the common case) are fully instrumented. */ export const mysql2Integration = defineIntegration(_mysql2Integration); diff --git a/packages/server-utils/src/integrations/openai.ts b/packages/server-utils/src/integrations/openai.ts index 4e022cb55f0c..6c30c612ec76 100644 --- a/packages/server-utils/src/integrations/openai.ts +++ b/packages/server-utils/src/integrations/openai.ts @@ -126,8 +126,8 @@ function wrapStreamResult(span: Span, data: OpenAiChatChannelContext, options: O } /** - * Orchestrion-driven OpenAI integration. Subscribes to the `orchestrion:openai:*` + * Diagnostics-channel-based OpenAI integration. Subscribes to the `orchestrion:openai:*` * diagnostics_channels injected into `openai`'s `create` methods (chat completions, responses, embeddings, - * conversations), so it requires the orchestrion runtime hook or bundler plugin. + * conversations), so it requires the Sentry runtime hook or bundler plugin. */ export const openAIIntegration = defineIntegration(_openAIIntegration); diff --git a/packages/server-utils/src/integrations/postgres-js.ts b/packages/server-utils/src/integrations/postgres-js.ts index ea373a6af158..859b942307a1 100644 --- a/packages/server-utils/src/integrations/postgres-js.ts +++ b/packages/server-utils/src/integrations/postgres-js.ts @@ -172,7 +172,7 @@ function wrapQuerySettlement(data: PostgresJsQueryContext, span: Span, sanitized _INTERNAL_setPostgresOperationName(span, sanitizedSqlQuery, command); span.end(); } catch (e) { - DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error ending span in resolve:', e); + DEBUG_BUILD && debug.error('[instrumentation:postgresjs] error ending span in resolve:', e); } return originalResolve.apply(this, resolveArgs); }; @@ -190,7 +190,7 @@ function wrapQuerySettlement(data: PostgresJsQueryContext, span: Span, sanitized _INTERNAL_setPostgresOperationName(span, sanitizedSqlQuery); span.end(); } catch (e) { - DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error ending span in reject:', e); + DEBUG_BUILD && debug.error('[instrumentation:postgresjs] error ending span in reject:', e); } return originalReject.apply(this, rejectArgs); }; @@ -289,7 +289,7 @@ function instrumentPostgresJs(options: PostgresJsIntegrationOptions): void { requestHook(span, sanitizedSqlQuery, context); } catch (e) { span.setAttribute('sentry.hook.error', 'requestHook failed'); - DEBUG_BUILD && debug.error('[orchestrion:postgresjs] error in requestHook:', e); + DEBUG_BUILD && debug.error('[instrumentation:postgresjs] error in requestHook:', e); } } @@ -318,12 +318,12 @@ function instrumentPostgresJs(options: PostgresJsIntegrationOptions): void { } /** - * Orchestrion-driven postgres.js (`postgres` v3.x) integration. + * Diagnostics-channel-based postgres.js (`postgres` v3.x) integration. * * Subscribes to the `orchestrion:postgres:handle` / `:connection` / `:execute` / * `:connect` diagnostics channels injected into postgres.js' `Query.prototype.handle` * and `Connection`/`execute`/`connect` (in `src/*` and `cjs/src/*`) and creates db - * spans matching the OTel `postgresJsIntegration`. Requires the orchestrion runtime + * spans matching the OTel `postgresJsIntegration`. Requires the Sentry runtime * hook or bundler plugin. */ export const postgresJsIntegration = defineIntegration(_postgresJsIntegration); diff --git a/packages/server-utils/src/integrations/postgres.ts b/packages/server-utils/src/integrations/postgres.ts index 567423a614d3..e9296eb1ab19 100644 --- a/packages/server-utils/src/integrations/postgres.ts +++ b/packages/server-utils/src/integrations/postgres.ts @@ -274,12 +274,12 @@ function getConnectionString(params: PgConnectionParams): string { } /** - * Orchestrion-driven `pg` (node-postgres) integration. + * Diagnostics-channel-based `pg` (node-postgres) integration. * * Subscribes to the `orchestrion:pg:query`/`:connect` and - * `orchestrion:pg-pool:connect` diagnostics_channels that the orchestrion code + * `orchestrion:pg-pool:connect` diagnostics_channels that Sentry's code * transform injects into `pg`'s `Client.prototype.query`/`connect` - * and `pg-pool`'s `Pool.prototype.connect`. Requires the orchestrion runtime + * and `pg-pool`'s `Pool.prototype.connect`. Requires the Sentry runtime * hook or bundler plugin to be active. */ export const postgresIntegration = defineIntegration(_postgresIntegration); diff --git a/packages/server-utils/src/integrations/redis/index.ts b/packages/server-utils/src/integrations/redis/index.ts index 873ae16aa292..ea31f3715f3f 100644 --- a/packages/server-utils/src/integrations/redis/index.ts +++ b/packages/server-utils/src/integrations/redis/index.ts @@ -328,7 +328,7 @@ function instrumentNodeRedis(options: RedisIntegrationOptions): void { * [ioredis](https://www.npmjs.com/package/ioredis) libraries. * * A single integration covers every client version: `redis` v2-v3, node-redis v4/v5 (`@redis/client`) - * and ioredis `<5.11.0` via orchestrion channels, and node-redis `>=5.12.0` / ioredis `>=5.11.0` via + * and ioredis `<5.11.0` via injected channels, and node-redis `>=5.12.0` / ioredis `>=5.11.0` via * their native `diagnostics_channel`. Captures single commands, `connect`, and multi/pipeline batches, * plus cache spans for keys matching the configured `cachePrefixes`. * diff --git a/packages/server-utils/src/integrations/tedious.ts b/packages/server-utils/src/integrations/tedious.ts index 65f0ea8d2c6b..e129e203ce27 100644 --- a/packages/server-utils/src/integrations/tedious.ts +++ b/packages/server-utils/src/integrations/tedious.ts @@ -248,10 +248,10 @@ function instrumentTedious(): void { } /** - * Orchestrion-driven tedious integration. + * Diagnostics-channel-based tedious integration. * - * Subscribes to the `orchestrion:tedious:*` diagnostics_channels that the orchestrion code transform + * Subscribes to the `orchestrion:tedious:*` diagnostics_channels that Sentry's code transform * injects into tedious's `Connection` request methods (each traced as one db span) and `Connection.connect` - * (active-database bookkeeping). Requires the orchestrion runtime hook or bundler plugin to be active. + * (active-database bookkeeping). Requires the Sentry runtime hook or bundler plugin to be active. */ export const tediousIntegration = defineIntegration(_tediousIntegration); diff --git a/packages/server-utils/src/integrations/vercel-ai.ts b/packages/server-utils/src/integrations/vercel-ai.ts index 08c754089c39..f0ecce59dc10 100644 --- a/packages/server-utils/src/integrations/vercel-ai.ts +++ b/packages/server-utils/src/integrations/vercel-ai.ts @@ -36,6 +36,6 @@ function instrumentVercelAiOrchestrion(options: VercelAiOptions): void { /** * Auto-instrument the `ai` SDK. Supported are: * - v7 via native `ai:telemetry` tracing channel - * - v4, v5 & v6 via orchestrion `orchestrion:ai:*` channels + * - v4, v5 & v6 via the injected `orchestrion:ai:*` channels */ export const vercelAIIntegration = defineIntegration(_vercelAIIntegration); diff --git a/packages/server-utils/src/orchestrion/bundler/esbuild.ts b/packages/server-utils/src/orchestrion/bundler/esbuild.ts index 6a329554c8c8..5d8d859ae73b 100644 --- a/packages/server-utils/src/orchestrion/bundler/esbuild.ts +++ b/packages/server-utils/src/orchestrion/bundler/esbuild.ts @@ -1,5 +1,7 @@ import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/esbuild'; import type { Plugin } from 'esbuild'; + +export type { Plugin as EsbuildPlugin } from 'esbuild'; import { escapeStringForRegex } from '@sentry/core'; import { instrumentedModuleNames } from '../config'; import type { PluginOptions } from './options'; diff --git a/packages/server-utils/src/orchestrion/bundler/rollup.ts b/packages/server-utils/src/orchestrion/bundler/rollup.ts index 104e7adaca12..3502c4636a9f 100644 --- a/packages/server-utils/src/orchestrion/bundler/rollup.ts +++ b/packages/server-utils/src/orchestrion/bundler/rollup.ts @@ -1,5 +1,7 @@ import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/rollup'; import type { NormalizedInputOptions, Plugin, PluginContext } from 'rollup'; + +export type { Plugin as RollupPlugin } from 'rollup'; import { instrumentedModuleNames } from '../config'; import type { PluginOptions } from './options'; import { externalizedModulesWarning, orchestrionTransformOptions } from './options'; diff --git a/packages/server-utils/src/orchestrion/bundler/vite.ts b/packages/server-utils/src/orchestrion/bundler/vite.ts index 3e3a31662a16..614d2079e833 100644 --- a/packages/server-utils/src/orchestrion/bundler/vite.ts +++ b/packages/server-utils/src/orchestrion/bundler/vite.ts @@ -1,5 +1,7 @@ import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/vite'; import type { Plugin, ResolvedConfig } from 'vite'; + +export type { Plugin as VitePlugin } from 'vite'; import { instrumentedModuleNames } from '../config'; import type { PluginOptions } from './options'; import { externalEntryMatchesModule, externalizedModulesWarning, orchestrionTransformOptions } from './options'; diff --git a/packages/server-utils/src/orchestrion/instrumentation.ts b/packages/server-utils/src/orchestrion/instrumentation.ts index 7a548ca634f7..304d65d402a6 100644 --- a/packages/server-utils/src/orchestrion/instrumentation.ts +++ b/packages/server-utils/src/orchestrion/instrumentation.ts @@ -59,12 +59,12 @@ export function invokeOrchestrionInstrumentation injected.includes(name)); if (injectedName) { - DEBUG_BUILD && debug.log(`[orchestrion:${label}] "${injectedName}" already injected, subscribing now`); + DEBUG_BUILD && debug.log(`[instrumentation:${label}] "${injectedName}" already injected, subscribing now`); run(); return; } - DEBUG_BUILD && debug.log(`[orchestrion:${label}] not injected yet, waiting for the module to load`); + DEBUG_BUILD && debug.log(`[instrumentation:${label}] not injected yet, waiting for the module to load`); const cleanup = client.on('orchestrion.module-injected', (moduleName: string) => { if (hasBeenInstrumented(callback)) { @@ -121,7 +121,7 @@ export function invokeOrchestrionInstrumentation { if (error) { - debug.warn(`[orchestrion] failed to inject diagnostics-channel into ${moduleName}:`, error); + debug.warn(`[instrumentation] failed to inject diagnostics-channel into ${moduleName}:`, error); } else { GLOBAL_OBJ.__SENTRY_ORCHESTRION__ = GLOBAL_OBJ.__SENTRY_ORCHESTRION__ || {}; GLOBAL_OBJ.__SENTRY_ORCHESTRION__.runtime = GLOBAL_OBJ.__SENTRY_ORCHESTRION__.runtime || []; diff --git a/packages/server-utils/src/tracing-channel.ts b/packages/server-utils/src/tracing-channel.ts index 54f274ebb763..5e8a670ff2c6 100644 --- a/packages/server-utils/src/tracing-channel.ts +++ b/packages/server-utils/src/tracing-channel.ts @@ -98,7 +98,7 @@ export function safeChannelCallback(fn: () => T): T | undefined { try { return fn(); } catch (error) { - DEBUG_BUILD && debug.warn('[orchestrion] error handling channel event', error); + DEBUG_BUILD && debug.warn('[instrumentation] error handling channel event', error); return undefined; } } diff --git a/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts b/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts index 72fc3a04b4bc..11625b488924 100644 --- a/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts +++ b/packages/server-utils/src/vercel-ai/vercel-ai-orchestrion-subscriber.ts @@ -203,7 +203,7 @@ export function subscribeVercelAiOrchestrionChannels( ); subscribeResolveLanguageModel(tracingChannel, CHANNELS.VERCEL_AI_RESOLVE_LANGUAGE_MODEL, options); } catch { - DEBUG_BUILD && debug.log('Vercel AI orchestrion channel subscription failed.'); + DEBUG_BUILD && debug.log('Vercel AI channel subscription failed.'); } } @@ -578,7 +578,7 @@ function patchOperationTools(tools: Record, options: VercelAiCh } } } catch { - DEBUG_BUILD && debug.log('Vercel AI orchestrion tool patching failed.'); + DEBUG_BUILD && debug.log('Vercel AI tool patching failed.'); } }