Skip to content

Commit

Permalink
fix(detector-aws): remove semconv incubating import (#2668)
Browse files Browse the repository at this point in the history
Co-authored-by: Trent Mick <[email protected]>
  • Loading branch information
garysassano and trentm authored Jan 20, 2025
1 parent 0db649f commit 3e95995
Show file tree
Hide file tree
Showing 6 changed files with 355 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,18 @@ import {
ResourceAttributes,
ResourceDetectionConfig,
} from '@opentelemetry/resources';
import {
ATTR_SERVICE_NAME,
ATTR_SERVICE_VERSION,
} from '@opentelemetry/semantic-conventions';
import {
ATTR_CLOUD_PROVIDER,
ATTR_CLOUD_PLATFORM,
ATTR_SERVICE_NAME,
ATTR_SERVICE_NAMESPACE,
ATTR_SERVICE_VERSION,
ATTR_SERVICE_INSTANCE_ID,
CLOUD_PROVIDER_VALUE_AWS,
CLOUD_PLATFORM_VALUE_AWS_ELASTIC_BEANSTALK,
} from '@opentelemetry/semantic-conventions/incubating';
} from '../semconv';
import * as fs from 'fs';
import * as util from 'util';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import {
ATTR_HOST_NAME,
CLOUD_PROVIDER_VALUE_AWS,
CLOUD_PLATFORM_VALUE_AWS_EC2,
} from '@opentelemetry/semantic-conventions/incubating';
} from '../semconv';
import * as http from 'http';

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import {
ATTR_AWS_LOG_STREAM_ARNS,
CLOUD_PROVIDER_VALUE_AWS,
CLOUD_PLATFORM_VALUE_AWS_ECS,
} from '@opentelemetry/semantic-conventions/incubating';
} from '../semconv';
// Patch until the OpenTelemetry SDK is updated to ship this attribute
import { SemanticResourceAttributes as AdditionalSemanticResourceAttributes } from './SemanticResourceAttributes';
import * as http from 'http';
Expand Down Expand Up @@ -166,8 +166,7 @@ export class AwsEcsDetectorSync implements DetectorSync {

const accountId: string = AwsEcsDetectorSync._getAccountFromArn(taskArn);
const region: string = AwsEcsDetectorSync._getRegionFromArn(taskArn);
const availabilityZone: string | undefined =
taskMetadata?.['AvailabilityZone'];
const availabilityZone: string | undefined = taskMetadata?.AvailabilityZone;

const clusterArn = cluster.startsWith('arn:')
? cluster
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import {
ATTR_CONTAINER_ID,
CLOUD_PROVIDER_VALUE_AWS,
CLOUD_PLATFORM_VALUE_AWS_EKS,
} from '@opentelemetry/semantic-conventions/incubating';
} from '../semconv';
import * as https from 'https';
import * as fs from 'fs';
import * as util from 'util';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
ATTR_FAAS_NAME,
CLOUD_PROVIDER_VALUE_AWS,
CLOUD_PLATFORM_VALUE_AWS_LAMBDA,
} from '@opentelemetry/semantic-conventions/incubating';
} from '../semconv';

/**
* The AwsLambdaDetector can be used to detect if a process is running in AWS Lambda
Expand Down
Loading

0 comments on commit 3e95995

Please sign in to comment.