@@ -34,10 +34,7 @@ import {
3434} from '@opentelemetry/api' ;
3535import { SamplingDecision } from '@opentelemetry/sdk-trace-base' ;
3636import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node' ;
37- import {
38- SEMRESATTRS_CLOUD_PLATFORM ,
39- ATTR_SERVICE_NAME ,
40- } from '@opentelemetry/semantic-conventions' ;
37+ import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions' ;
4138import { expect } from 'expect' ;
4239import * as nock from 'nock' ;
4340import * as sinon from 'sinon' ;
@@ -46,6 +43,7 @@ import {
4643 AWSXRayRemoteSampler ,
4744} from '../src/remote-sampler' ;
4845import { AWSXRaySamplingClient } from '../src/aws-xray-sampling-client' ;
46+ import { ATTR_CLOUD_PLATFORM } from '../src/semconv' ;
4947
5048const DATA_DIR_SAMPLING_RULES =
5149 __dirname + '/data/test-remote-sampler_sampling-rules-response-sample.json' ;
@@ -81,7 +79,7 @@ describe('AWSXRayRemoteSampler', () => {
8179 it ( 'testCreateRemoteSamplerWithPopulatedResource' , ( ) => {
8280 const resource = resourceFromAttributes ( {
8381 [ ATTR_SERVICE_NAME ] : 'test-service-name' ,
84- [ SEMRESATTRS_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
82+ [ ATTR_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
8583 } ) ;
8684 sampler = new AWSXRayRemoteSampler ( { resource : resource } ) ;
8785
@@ -100,7 +98,7 @@ describe('AWSXRayRemoteSampler', () => {
10098 it ( 'testCreateRemoteSamplerWithAllFieldsPopulated' , ( ) => {
10199 const resource = resourceFromAttributes ( {
102100 [ ATTR_SERVICE_NAME ] : 'test-service-name' ,
103- [ SEMRESATTRS_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
101+ [ ATTR_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
104102 } ) ;
105103 sampler = new AWSXRayRemoteSampler ( {
106104 resource : resource ,
@@ -132,7 +130,7 @@ describe('AWSXRayRemoteSampler', () => {
132130 . reply ( 200 , require ( DATA_DIR_SAMPLING_TARGETS ) ) ;
133131 const resource = resourceFromAttributes ( {
134132 [ ATTR_SERVICE_NAME ] : 'test-service-name' ,
135- [ SEMRESATTRS_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
133+ [ ATTR_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
136134 } ) ;
137135
138136 sampler = new AWSXRayRemoteSampler ( {
@@ -203,7 +201,7 @@ describe('AWSXRayRemoteSampler', () => {
203201 . reply ( 200 , require ( DATA_DIR_SAMPLING_TARGETS ) ) ;
204202 const resource = resourceFromAttributes ( {
205203 [ ATTR_SERVICE_NAME ] : 'test-service-name' ,
206- [ SEMRESATTRS_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
204+ [ ATTR_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
207205 } ) ;
208206 const attributes = { abc : '1234' } ;
209207
@@ -269,7 +267,7 @@ describe('AWSXRayRemoteSampler', () => {
269267 . reply ( 200 , require ( DATA_DIR_SAMPLING_TARGETS ) ) ;
270268 const resource = resourceFromAttributes ( {
271269 [ ATTR_SERVICE_NAME ] : 'test-service-name' ,
272- [ SEMRESATTRS_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
270+ [ ATTR_CLOUD_PLATFORM ] : 'test-cloud-platform' ,
273271 } ) ;
274272 const attributes = {
275273 abc : 'non-matching attribute value, use default rule' ,
0 commit comments