Skip to content

Commit 4199315

Browse files
andreiborzaclaude
andauthored
ref(node): Remove vendored Koa instrumentation (#22751)
## What Removes the dead OpenTelemetry `KoaInstrumentation` (and `instrumentKoa`) plus its vendored code from `@sentry/node`. Keeps `setupKoaErrorHandler`. ## Why The Koa integration is now provided by the channel-based implementation in `@sentry/server-utils` (the default since #22501). The vendored instrumentation is no longer wired up; only the Sentry-specific error handler remains user-facing. Ref: #22346 Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8935963 commit 4199315

7 files changed

Lines changed: 0 additions & 427 deletions

File tree

packages/node/src/integrations/tracing/koa/index.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,6 @@
1-
import type { KoaInstrumentationConfig, KoaLayerType } from './vendored/types';
2-
import { KoaInstrumentation } from './vendored/instrumentation';
31
import { captureException } from '@sentry/core';
4-
import { generateInstrumentOnce } from '../../../otel/instrument';
52
import { ensureIsWrapped } from '../../../utils/ensureIsWrapped';
63

7-
interface KoaOptions {
8-
/**
9-
* Ignore layers of specified types
10-
*/
11-
ignoreLayersType?: Array<'middleware' | 'router'>;
12-
}
13-
14-
const INTEGRATION_NAME = 'Koa' as const;
15-
16-
export const instrumentKoa = generateInstrumentOnce(
17-
INTEGRATION_NAME,
18-
KoaInstrumentation,
19-
(options: KoaOptions = {}) => {
20-
return {
21-
ignoreLayersType: options.ignoreLayersType as KoaLayerType[],
22-
} satisfies KoaInstrumentationConfig;
23-
},
24-
);
25-
264
/**
275
* Add an Koa error handler to capture errors to Sentry.
286
*

packages/node/src/integrations/tracing/koa/vendored/enums/AttributeNames.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

packages/node/src/integrations/tracing/koa/vendored/instrumentation.ts

Lines changed: 0 additions & 186 deletions
This file was deleted.

packages/node/src/integrations/tracing/koa/vendored/internal-types.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

packages/node/src/integrations/tracing/koa/vendored/types.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

packages/node/src/integrations/tracing/koa/vendored/utils.ts

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)