Skip to content

Commit 483fcb2

Browse files
committed
Populate default integrations from server-utils channel integrations
getAutoPerformanceIntegrations now uses the channel integrations from @sentry/server-utils/orchestrion directly instead of routing through the thin @sentry/node wrappers. Redis and Fastify keep their node wrappers (cache responseHook wiring; Fastify v3/v4 coverage). The wrapper files and their public exports are unchanged; removing them and the vendored OTel is tracked in JS-3074.
1 parent 19aa912 commit 483fcb2

1 file changed

Lines changed: 49 additions & 44 deletions

File tree

  • packages/node/src/integrations/tracing

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

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,68 @@
11
import type { Integration } from '@sentry/core';
22
import { prismaIntegration } from '@sentry/server-utils';
3+
import {
4+
amqplibChannelIntegration,
5+
anthropicChannelIntegration,
6+
expressChannelIntegration,
7+
firebaseChannelIntegration,
8+
genericPoolChannelIntegration,
9+
googleGenAIChannelIntegration,
10+
graphqlDiagnosticsChannelIntegration,
11+
hapiChannelIntegration,
12+
kafkajsChannelIntegration,
13+
koaChannelIntegration,
14+
langChainChannelIntegration,
15+
langGraphChannelIntegration,
16+
lruMemoizerChannelIntegration,
17+
mongodbChannelIntegration,
18+
mongooseChannelIntegration,
19+
mysqlChannelIntegration,
20+
mysql2ChannelIntegration,
21+
openaiChannelIntegration,
22+
postgresChannelIntegration,
23+
postgresJsChannelIntegration,
24+
tediousChannelIntegration,
25+
vercelAiChannelIntegration,
26+
} from '@sentry/server-utils/orchestrion';
327
import { instrumentSentryHttp } from '../http';
4-
import { amqplibIntegration } from './amqplib';
5-
import { anthropicAIIntegration } from './anthropic-ai';
6-
import { expressIntegration } from './express';
728
import { fastifyIntegration, instrumentFastifyV3 } from './fastify';
8-
import { firebaseIntegration } from './firebase';
9-
import { genericPoolIntegration } from './genericPool';
10-
import { googleGenAIIntegration } from './google-genai';
11-
import { graphqlIntegration } from './graphql';
12-
import { hapiIntegration } from './hapi';
13-
import { kafkaIntegration } from './kafka';
14-
import { koaIntegration } from './koa';
15-
import { langChainIntegration } from './langchain';
16-
import { langGraphIntegration } from './langgraph';
17-
import { lruMemoizerIntegration } from './lrumemoizer';
18-
import { mongoIntegration } from './mongo';
19-
import { mongooseIntegration } from './mongoose';
20-
import { mysqlIntegration } from './mysql';
21-
import { mysql2Integration } from './mysql2';
22-
import { openAIIntegration } from './openai';
23-
import { postgresIntegration } from './postgres';
24-
import { postgresJsIntegration } from './postgresjs';
2529
import { instrumentRedis, redisChannelIntegrations } from './redis';
26-
import { tediousIntegration } from './tedious';
27-
import { vercelAIIntegration } from './vercelai';
2830

2931
/**
3032
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
3133
*/
3234
export function getAutoPerformanceIntegrations(): Integration[] {
3335
return [
34-
expressIntegration(),
36+
expressChannelIntegration(),
37+
// Fastify keeps the node wrapper: the channel path only covers Fastify v5, the wrapper also
38+
// instruments v3/v4.
3539
fastifyIntegration(),
36-
graphqlIntegration(),
37-
mongoIntegration(),
38-
mongooseIntegration(),
39-
mysqlIntegration(),
40-
mysql2Integration(),
40+
graphqlDiagnosticsChannelIntegration(),
41+
mongodbChannelIntegration(),
42+
mongooseChannelIntegration(),
43+
mysqlChannelIntegration(),
44+
mysql2ChannelIntegration(),
45+
// Redis keeps the node wrapper: it wires the cache `responseHook` into the channel integrations.
4146
...redisChannelIntegrations(),
42-
postgresIntegration(),
47+
postgresChannelIntegration(),
4348
prismaIntegration(),
44-
hapiIntegration(),
45-
koaIntegration(),
46-
tediousIntegration(),
47-
genericPoolIntegration(),
48-
kafkaIntegration(),
49-
amqplibIntegration(),
50-
lruMemoizerIntegration(),
49+
hapiChannelIntegration(),
50+
koaChannelIntegration(),
51+
tediousChannelIntegration(),
52+
genericPoolChannelIntegration(),
53+
kafkajsChannelIntegration(),
54+
amqplibChannelIntegration(),
55+
lruMemoizerChannelIntegration(),
5156
// AI providers
5257
// LangChain must come first to disable AI provider integrations before they instrument
53-
langChainIntegration(),
54-
langGraphIntegration(),
55-
vercelAIIntegration(),
56-
openAIIntegration(),
57-
anthropicAIIntegration(),
58-
googleGenAIIntegration(),
59-
postgresJsIntegration(),
60-
firebaseIntegration(),
58+
langChainChannelIntegration(),
59+
langGraphChannelIntegration(),
60+
vercelAiChannelIntegration(),
61+
openaiChannelIntegration(),
62+
anthropicChannelIntegration(),
63+
googleGenAIChannelIntegration(),
64+
postgresJsChannelIntegration(),
65+
firebaseChannelIntegration(),
6166
];
6267
}
6368

0 commit comments

Comments
 (0)