-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(server-utils): Allow passing custom transforms to orchestrion #22319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,8 @@ import { createRequire } from 'node:module'; | |
| import { dirname } from 'node:path'; | ||
| import type { InstrumentationConfig } from '@apm-js-collab/code-transformer'; | ||
| import { SENTRY_INSTRUMENTATIONS } from '../config'; | ||
| import type { PluginOptions } from './options'; | ||
| import { orchestrionTransformOptions } from './options'; | ||
|
|
||
| // Both branches use `createRequire` (never alias the CJS `require`) so bundlers consuming this | ||
| // module don't emit a "Critical dependency" warning. | ||
|
|
@@ -42,14 +44,12 @@ export function getSentryInstrumentations(): InstrumentationConfig[] { | |
| } | ||
|
|
||
| /** | ||
| * The code-transform webpack plugin, pre-fed the instrumentation config. Unlike the Vite plugin it | ||
| * does NOT inject the `__SENTRY_ORCHESTRION__.bundler` marker — that would disable the runtime | ||
| * module hook, which externalized packages still need (hybrid setup). | ||
| * The code-transform webpack plugin, pre-fed the instrumentation config | ||
| */ | ||
| export function sentryOrchestrionWebpackPlugin(): unknown { | ||
| export function sentryOrchestrionWebpackPlugin(options: PluginOptions = {}): unknown { | ||
| const mod = getOrchestrionRequire()('@apm-js-collab/code-transformer-bundler-plugins/webpack') as { | ||
| default?: (options: { instrumentations: InstrumentationConfig[] }) => unknown; | ||
| }; | ||
| const codeTransformerWebpack = mod.default ?? (mod as unknown as NonNullable<typeof mod.default>); | ||
| return codeTransformerWebpack({ instrumentations: SENTRY_INSTRUMENTATIONS }); | ||
| return codeTransformerWebpack(orchestrionTransformOptions(options)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Webpack injects diagnostics by defaultMedium Severity
Reviewed by Cursor Bugbot for commit 074639c. Configure here.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine now we've removed the runtime skipping |
||
| } | ||


Uh oh!
There was an error while loading. Please reload this page.