Skip to content

Commit 1e3ff4f

Browse files
committed
added '===' and removed redundant normalized sns mapping
1 parent c3e4e6b commit 1e3ff4f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

aws-distro-opentelemetry-node-autoinstrumentation/src/aws-metric-attribute-generator.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ export class AwsMetricAttributeGenerator implements MetricAttributeGenerator {
335335
BedrockAgentRuntime: NORMALIZED_BEDROCK_SERVICE_NAME,
336336
BedrockRuntime: NORMALIZED_BEDROCK_RUNTIME_SERVICE_NAME,
337337
SecretsManager: NORMALIZED_SECRETSMANAGER_SERVICE_NAME,
338-
SNS: NORMALIZED_SNS_SERVICE_NAME,
339338
SFN: NORMALIZED_STEPFUNCTIONS_SERVICE_NAME,
340339
};
341340
return awsSdkServiceMapping[serviceName] || 'AWS::' + serviceName;
@@ -591,7 +590,7 @@ export class AwsMetricAttributeGenerator implements MetricAttributeGenerator {
591590

592591
// Extracts the name of the resource from an arn
593592
private static extractResourceNameFromArn(attribute: AttributeValue | undefined): string | undefined {
594-
if (typeof attribute == 'string' && attribute.startsWith('arn:aws:')) {
593+
if (typeof attribute === 'string' && attribute.startsWith('arn:aws:')) {
595594
const split = attribute.split(':');
596595
return split[split.length - 1];
597596
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class SecretsManagerServiceExtension implements ServiceExtension {
1919

2020
const spanAttributes: Attributes = {};
2121

22-
if (typeof secretId == 'string' && secretId.startsWith('arn:aws:secretsmanager:')) {
22+
if (typeof secretId === 'string' && secretId.startsWith('arn:aws:secretsmanager:')) {
2323
spanAttributes[AWS_ATTRIBUTE_KEYS.AWS_SECRETSMANAGER_SECRET_ARN] = secretId;
2424
}
2525

0 commit comments

Comments
 (0)