diff --git a/packages/opentelemetry-exporter-collector/package.json b/packages/opentelemetry-exporter-collector/package.json index 594e0f4bbd1..9e11325b521 100644 --- a/packages/opentelemetry-exporter-collector/package.json +++ b/packages/opentelemetry-exporter-collector/package.json @@ -50,7 +50,6 @@ }, "devDependencies": { "@babel/core": "^7.6.0", - "@opentelemetry/resources": "^0.4.0", "@types/mocha": "^5.2.5", "@types/node": "^12.6.8", "@types/sinon": "^7.0.13", diff --git a/packages/opentelemetry-exporter-stackdriver-trace/package.json b/packages/opentelemetry-exporter-stackdriver-trace/package.json index 8e212713234..088bb8580c6 100644 --- a/packages/opentelemetry-exporter-stackdriver-trace/package.json +++ b/packages/opentelemetry-exporter-stackdriver-trace/package.json @@ -41,7 +41,6 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/resources": "^0.4.0", "@types/mocha": "^5.2.7", "@types/nock": "^11.1.0", "@types/node": "^12.6.9", diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index 7407f14b726..3b5db3ba0be 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -39,7 +39,6 @@ "access": "public" }, "devDependencies": { - "@opentelemetry/resources": "^0.4.0", "@types/mocha": "^5.2.7", "@types/nock": "^10.0.3", "@types/node": "^12.6.9", diff --git a/packages/opentelemetry-exporter-zipkin/test/transform.test.ts b/packages/opentelemetry-exporter-zipkin/test/transform.test.ts index 9d51333bb67..6f5854d2e6b 100644 --- a/packages/opentelemetry-exporter-zipkin/test/transform.test.ts +++ b/packages/opentelemetry-exporter-zipkin/test/transform.test.ts @@ -21,6 +21,7 @@ import { NoopLogger, hrTimeToMicroseconds, hrTimeDuration, + VERSION, } from '@opentelemetry/core'; import { toZipkinSpan, @@ -48,7 +49,6 @@ const DUMMY_RESOUCE = new Resource({ version: 1, cost: 112.12, }); -const EMPTY_RESOUCE = Resource.empty(); describe('transform', () => { describe('toZipkinSpan', () => { @@ -94,6 +94,9 @@ describe('transform', () => { key1: 'value1', key2: 'value2', [statusCodeTagName]: 'OK', + 'telemetry.sdk.language': 'nodejs', + 'telemetry.sdk.name': 'opentelemetry', + 'telemetry.sdk.version': VERSION, }, timestamp: hrTimeToMicroseconds(span.startTime), traceId: span.spanContext.traceId, @@ -128,6 +131,9 @@ describe('transform', () => { parentId: undefined, tags: { [statusCodeTagName]: 'OK', + 'telemetry.sdk.language': 'nodejs', + 'telemetry.sdk.name': 'opentelemetry', + 'telemetry.sdk.version': VERSION, }, timestamp: hrTimeToMicroseconds(span.startTime), traceId: span.spanContext.traceId, @@ -167,6 +173,9 @@ describe('transform', () => { parentId: undefined, tags: { [statusCodeTagName]: 'OK', + 'telemetry.sdk.language': 'nodejs', + 'telemetry.sdk.name': 'opentelemetry', + 'telemetry.sdk.version': VERSION, }, timestamp: hrTimeToMicroseconds(span.startTime), traceId: span.spanContext.traceId, @@ -226,7 +235,7 @@ describe('transform', () => { span.status, statusCodeTagName, statusDescriptionTagName, - EMPTY_RESOUCE + Resource.empty() ); assert.deepStrictEqual(tags, { diff --git a/packages/opentelemetry-resources/src/Resource.ts b/packages/opentelemetry-resources/src/Resource.ts index 89522abffbb..471e7a943a4 100644 --- a/packages/opentelemetry-resources/src/Resource.ts +++ b/packages/opentelemetry-resources/src/Resource.ts @@ -66,10 +66,4 @@ export class Resource { const mergedLabels = Object.assign({}, other.labels, this.labels); return new Resource(mergedLabels); } - - static empty(): Resource { - return EMPTY_RESOURCE; - } } - -const EMPTY_RESOURCE = new Resource({});