Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/bun/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -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:
*
Expand All @@ -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.
*
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
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.
Expand Down Expand Up @@ -1238,7 +1238,7 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
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;
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/integrations/postgresjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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[];
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/worldwide.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export type InternalGlobal = {
_sentryModuleMetadata?: Record<string, any>;
_sentryWrappedDepth?: number;
/**
* Orchestrion bundler and runtime detection.
* Bundler and runtime instrumentation detection.
*/
__SENTRY_ORCHESTRION__?: {
/** Empty array signifies runtime hooked */
Expand Down
6 changes: 2 additions & 4 deletions packages/deno/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/node/src/bundler-plugin/esbuild.ts
Original file line number Diff line number Diff line change
@@ -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';
Comment thread
timfish marked this conversation as resolved.

export type SentryEsbuildPluginOptions = SentryEsbuildPluginOptionsBase & {
/**
* @ignore This is for internal use only when this plugin is consumed by a framework SDK
*/
instrumentations?: NonNullable<Parameters<typeof sentryOrchestrionPlugin>[0]>['instrumentations'];
instrumentations?: InstrumentationConfig[];

/**
* Automatic instrumentation of server-side dependencies at build time.
Expand All @@ -18,8 +20,6 @@ export type SentryEsbuildPluginOptions = SentryEsbuildPluginOptionsBase & {
buildTimeInstrumentation?: boolean;
};

type EsbuildPlugin = ReturnType<typeof sentryOrchestrionPlugin>;

/**
* esbuild plugin that bundles the Sentry esbuild bundler plugin (source maps,
* release injection, …) together with the code transformer
Expand Down
6 changes: 3 additions & 3 deletions packages/node/src/bundler-plugin/rollup.ts
Original file line number Diff line number Diff line change
@@ -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<Parameters<typeof sentryOrchestrionPlugin>[0]>['instrumentations'];
instrumentations?: InstrumentationConfig[];

/**
* Automatic instrumentation of server-side dependencies at build time.
Expand All @@ -18,8 +20,6 @@ export type SentryRollupPluginOptions = SentryRollupPluginOptionsBase & {
buildTimeInstrumentation?: boolean;
};

type RollupPlugin = ReturnType<typeof sentryOrchestrionPlugin>;

/**
* Rollup plugin that bundles the Sentry Rollup bundler plugin (source maps,
* release injection, bundle size optimizations, …) together with the
Expand Down
6 changes: 3 additions & 3 deletions packages/node/src/bundler-plugin/vite.ts
Original file line number Diff line number Diff line change
@@ -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<Parameters<typeof sentryOrchestrionPlugin>[0]>['instrumentations'];
instrumentations?: InstrumentationConfig[];

/**
* Automatic instrumentation of server-side dependencies at build time.
Expand All @@ -18,8 +20,6 @@ export type SentryVitePluginOptions = SentryVitePluginOptionsBase & {
buildTimeInstrumentation?: boolean;
};

type VitePlugin = ReturnType<typeof sentryOrchestrionPlugin>;

/**
* Vite plugin that bundles the Sentry Vite bundler plugin (source maps, release
* injection, bundle size optimizations, …) together with the code
Expand Down
3 changes: 2 additions & 1 deletion packages/node/src/bundler-plugin/webpack.ts
Original file line number Diff line number Diff line change
@@ -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<Parameters<typeof sentryOrchestrionWebpackPlugin>[0]>['instrumentations'];
instrumentations?: InstrumentationConfig[];

/**
* Automatic instrumentation of server-side dependencies at build time.
Expand Down
6 changes: 3 additions & 3 deletions packages/server-utils/src/integrations/amqplib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,10 @@ function getHeaderAsString(headers: Record<string, unknown> | 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);
4 changes: 2 additions & 2 deletions packages/server-utils/src/integrations/anthropic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
6 changes: 3 additions & 3 deletions packages/server-utils/src/integrations/aws-sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
8 changes: 4 additions & 4 deletions packages/server-utils/src/integrations/dataloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
6 changes: 3 additions & 3 deletions packages/server-utils/src/integrations/express/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Original file line number Diff line number Diff line change
Expand Up @@ -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',
);
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/server-utils/src/integrations/firebase/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 2 additions & 2 deletions packages/server-utils/src/integrations/generic-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions packages/server-utils/src/integrations/google-genai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
4 changes: 2 additions & 2 deletions packages/server-utils/src/integrations/hapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
6 changes: 3 additions & 3 deletions packages/server-utils/src/integrations/kafkajs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Loading
Loading