File tree Expand file tree Collapse file tree 6 files changed +355
-9
lines changed
detectors/node/opentelemetry-resource-detector-aws/src Expand file tree Collapse file tree 6 files changed +355
-9
lines changed Original file line number Diff line number Diff 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' ;
2731import {
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 ' ;
3739import * as fs from 'fs' ;
3840import * as util from 'util' ;
3941
Original file line number Diff line number Diff 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 ' ;
3838import * as http from 'http' ;
3939
4040/**
Original file line number Diff line number Diff 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
4747import { SemanticResourceAttributes as AdditionalSemanticResourceAttributes } from './SemanticResourceAttributes' ;
4848import * 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
Original file line number Diff line number Diff 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 ' ;
3434import * as https from 'https' ;
3535import * as fs from 'fs' ;
3636import * as util from 'util' ;
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments