Skip to content

Commit e9cde04

Browse files
committed
Use channel-based aws-sdk integration in @sentry/aws-serverless
The aws-serverless `awsIntegration` still registered the vendored OTel `AwsInstrumentation`, emitting `auto.otel.aws` spans, while channel-based instrumentation is now the default everywhere else. Delegate to the channel `awsChannelIntegration` from @sentry/server-utils so aws-sdk spans carry the orchestrion origin, matching @sentry/node.
1 parent 68f957c commit e9cde04

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

packages/aws-serverless/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"@sentry/conventions": "^0.16.0",
6868
"@sentry/core": "10.67.0",
6969
"@sentry/node": "10.67.0",
70+
"@sentry/server-utils": "10.67.0",
7071
"@types/aws-lambda": "^8.10.161"
7172
},
7273
"devDependencies": {
Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
import { registerInstrumentations } from '@opentelemetry/instrumentation';
2-
import { AwsInstrumentation } from './vendored/aws-sdk';
31
import { defineIntegration } from '@sentry/core';
2+
import { awsChannelIntegration } from '@sentry/server-utils/orchestrion';
43

54
/**
6-
* Instrumentation for aws-sdk package
5+
* Instrumentation for the `aws-sdk` package.
6+
*
7+
* Channel-based (orchestrion diagnostics-channel) instrumentation is the default, matching
8+
* `@sentry/node`. The channel injection hooks are installed by `Sentry.init()` (via `@sentry/node`),
9+
* so `aws-sdk` imported afterwards publishes the `send` channel events this subscribes to.
710
*/
811
export const awsIntegration = defineIntegration(() => {
9-
return {
10-
name: 'Aws' as const,
11-
setupOnce() {
12-
registerInstrumentations({
13-
instrumentations: [new AwsInstrumentation()],
14-
});
15-
},
16-
};
12+
return awsChannelIntegration();
1713
});

0 commit comments

Comments
 (0)