Skip to content

Commit 3e95995

Browse files
garysassanotrentm
andauthored
fix(detector-aws): remove semconv incubating import (#2668)
Co-authored-by: Trent Mick <[email protected]>
1 parent 0db649f commit 3e95995

File tree

6 files changed

+355
-9
lines changed

6 files changed

+355
-9
lines changed

detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsBeanstalkDetectorSync.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ import {
2424
ResourceAttributes,
2525
ResourceDetectionConfig,
2626
} from '@opentelemetry/resources';
27+
import {
28+
ATTR_SERVICE_NAME,
29+
ATTR_SERVICE_VERSION,
30+
} from '@opentelemetry/semantic-conventions';
2731
import {
2832
ATTR_CLOUD_PROVIDER,
2933
ATTR_CLOUD_PLATFORM,
30-
ATTR_SERVICE_NAME,
3134
ATTR_SERVICE_NAMESPACE,
32-
ATTR_SERVICE_VERSION,
3335
ATTR_SERVICE_INSTANCE_ID,
3436
CLOUD_PROVIDER_VALUE_AWS,
3537
CLOUD_PLATFORM_VALUE_AWS_ELASTIC_BEANSTALK,
36-
} from '@opentelemetry/semantic-conventions/incubating';
38+
} from '../semconv';
3739
import * as fs from 'fs';
3840
import * as util from 'util';
3941

detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEc2DetectorSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
ATTR_HOST_NAME,
3535
CLOUD_PROVIDER_VALUE_AWS,
3636
CLOUD_PLATFORM_VALUE_AWS_EC2,
37-
} from '@opentelemetry/semantic-conventions/incubating';
37+
} from '../semconv';
3838
import * as http from 'http';
3939

4040
/**

detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEcsDetectorSync.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
ATTR_AWS_LOG_STREAM_ARNS,
4343
CLOUD_PROVIDER_VALUE_AWS,
4444
CLOUD_PLATFORM_VALUE_AWS_ECS,
45-
} from '@opentelemetry/semantic-conventions/incubating';
45+
} from '../semconv';
4646
// Patch until the OpenTelemetry SDK is updated to ship this attribute
4747
import { SemanticResourceAttributes as AdditionalSemanticResourceAttributes } from './SemanticResourceAttributes';
4848
import * as http from 'http';
@@ -166,8 +166,7 @@ export class AwsEcsDetectorSync implements DetectorSync {
166166

167167
const accountId: string = AwsEcsDetectorSync._getAccountFromArn(taskArn);
168168
const region: string = AwsEcsDetectorSync._getRegionFromArn(taskArn);
169-
const availabilityZone: string | undefined =
170-
taskMetadata?.['AvailabilityZone'];
169+
const availabilityZone: string | undefined = taskMetadata?.AvailabilityZone;
171170

172171
const clusterArn = cluster.startsWith('arn:')
173172
? cluster

detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsEksDetectorSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
ATTR_CONTAINER_ID,
3131
CLOUD_PROVIDER_VALUE_AWS,
3232
CLOUD_PLATFORM_VALUE_AWS_EKS,
33-
} from '@opentelemetry/semantic-conventions/incubating';
33+
} from '../semconv';
3434
import * as https from 'https';
3535
import * as fs from 'fs';
3636
import * as util from 'util';

detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsLambdaDetectorSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
ATTR_FAAS_NAME,
3030
CLOUD_PROVIDER_VALUE_AWS,
3131
CLOUD_PLATFORM_VALUE_AWS_LAMBDA,
32-
} from '@opentelemetry/semantic-conventions/incubating';
32+
} from '../semconv';
3333

3434
/**
3535
* The AwsLambdaDetector can be used to detect if a process is running in AWS Lambda

0 commit comments

Comments
 (0)