Skip to content

Commit

Permalink
refactor(detectors): use values from semantic-conventions package (#704)
Browse files Browse the repository at this point in the history
* refactor(detectors): use values from semantic-conventions package

* chore: tweaks
  • Loading branch information
meteorlxy authored Oct 21, 2021
1 parent 096b694 commit 61190bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import {
Resource,
ResourceDetectionConfig,
} from '@opentelemetry/resources';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import * as http from 'http';
import {
CloudProviderValues,
CloudPlatformValues,
} from '../semantic-conventions';
CloudProviderValues,
SemanticResourceAttributes,
} from '@opentelemetry/semantic-conventions';
import * as http from 'http';

/**
* The AlibabaCloudEcsDetector can be used to detect if a process is running in
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import * as nock from 'nock';
import * as assert from 'assert';
import { Resource } from '@opentelemetry/resources';
import { CloudProviderValues } from '@opentelemetry/semantic-conventions';
import { alibabaCloudEcsDetector } from '../../src';
import {
assertCloudResource,
Expand Down Expand Up @@ -69,7 +70,7 @@ describe('alibabaCloudEcsDetector', () => {
assert.ok(resource);

assertCloudResource(resource, {
provider: 'alibaba_cloud',
provider: CloudProviderValues.ALIBABA_CLOUD,
accountId: 'my-owner-account-id',
region: 'my-region-id',
zone: 'my-zone-id',
Expand Down

0 comments on commit 61190bc

Please sign in to comment.