Skip to content

Commit 6db2a9b

Browse files
committed
removed s3 and kinesis from needing to be patched as upstream already has them
1 parent d22a07f commit 6db2a9b

File tree

4 files changed

+2
-100
lines changed

4 files changed

+2
-100
lines changed

aws-distro-opentelemetry-node-autoinstrumentation/src/patches/aws/services/kinesis.ts

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

aws-distro-opentelemetry-node-autoinstrumentation/src/patches/aws/services/s3.ts

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

aws-distro-opentelemetry-node-autoinstrumentation/src/patches/instrumentation-patch.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ import {
2323
BedrockRuntimeServiceExtension,
2424
BedrockServiceExtension,
2525
} from './aws/services/bedrock';
26-
import { KinesisServiceExtension } from './aws/services/kinesis';
27-
import { S3ServiceExtension } from './aws/services/s3';
2826
import { SecretsManagerServiceExtension } from './aws/services/secretsmanager';
2927
import { StepFunctionsServiceExtension } from './aws/services/step-functions';
3028
import { InstrumentationConfigMap } from '@opentelemetry/auto-instrumentations-node';
@@ -68,8 +66,6 @@ export function applyInstrumentationPatches(
6866
const services: Map<string, ServiceExtension> | undefined = (instrumentations[index] as any).servicesExtensions
6967
?.services;
7068
if (services) {
71-
services.set('S3', new S3ServiceExtension());
72-
services.set('Kinesis', new KinesisServiceExtension());
7369
services.set('SecretsManager', new SecretsManagerServiceExtension());
7470
services.set('SFN', new StepFunctionsServiceExtension());
7571
services.set('Bedrock', new BedrockServiceExtension());

aws-distro-opentelemetry-node-autoinstrumentation/test/patches/instrumentation-patch.test.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ describe('InstrumentationPatchTest', () => {
100100
expect(services.has('SNS')).toBeTruthy();
101101
expect(services.has('DynamoDB')).toBeTruthy();
102102
expect(services.has('Lambda')).toBeTruthy();
103+
expect(services.has('S3')).toBeTruthy();
104+
expect(services.has('Kinesis')).toBeTruthy();
103105

104106
// From patching
105107
expect(services.has('SecretsManager')).toBeTruthy();
106108
expect(services.has('SFN')).toBeTruthy();
107-
expect(services.has('S3')).toBeTruthy();
108-
expect(services.has('Kinesis')).toBeTruthy();
109109
expect(services.get('SNS')._requestPreSpanHook).toBeTruthy();
110110
expect(services.get('SNS').requestPreSpanHook).toBeTruthy();
111111
expect(services.get('Lambda')._requestPreSpanHook).toBeTruthy();
@@ -123,18 +123,6 @@ describe('InstrumentationPatchTest', () => {
123123
expect(awsSdkInstrumentation).toBeInstanceOf(AwsSdkInstrumentationExtended);
124124
});
125125

126-
it('S3 without patching', () => {
127-
const unpatchedAwsSdkInstrumentation: AwsInstrumentation = extractAwsSdkInstrumentation(UNPATCHED_INSTRUMENTATIONS);
128-
const services: Map<string, any> = extractServicesFromAwsSdkInstrumentation(unpatchedAwsSdkInstrumentation);
129-
expect(() => doExtractS3Attributes(services)).toThrow();
130-
});
131-
132-
it('Kinesis without patching', () => {
133-
const unpatchedAwsSdkInstrumentation: AwsInstrumentation = extractAwsSdkInstrumentation(UNPATCHED_INSTRUMENTATIONS);
134-
const services: Map<string, any> = extractServicesFromAwsSdkInstrumentation(unpatchedAwsSdkInstrumentation);
135-
expect(() => doExtractKinesisAttributes(services)).toThrow();
136-
});
137-
138126
it('SQS without patching', () => {
139127
const unpatchedAwsSdkInstrumentation: AwsInstrumentation = extractAwsSdkInstrumentation(UNPATCHED_INSTRUMENTATIONS);
140128
const services: Map<string, any> = extractServicesFromAwsSdkInstrumentation(unpatchedAwsSdkInstrumentation);

0 commit comments

Comments
 (0)