From 7f3d3a2fcc809ed7ad325c36476019db937797f6 Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Fri, 4 Dec 2020 23:26:48 +0100 Subject: [PATCH 01/10] chore: use new gRPC default port --- examples/collector-exporter-node/docker/docker-compose.yaml | 4 ++-- packages/opentelemetry-exporter-collector-grpc/README.md | 6 +++--- .../src/CollectorMetricExporter.ts | 2 +- .../src/CollectorTraceExporter.ts | 2 +- .../test/CollectorMetricExporter.test.ts | 2 +- .../test/CollectorTraceExporter.test.ts | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/collector-exporter-node/docker/docker-compose.yaml b/examples/collector-exporter-node/docker/docker-compose.yaml index e93b603c49..97423dfa95 100644 --- a/examples/collector-exporter-node/docker/docker-compose.yaml +++ b/examples/collector-exporter-node/docker/docker-compose.yaml @@ -2,14 +2,14 @@ version: "3" services: # Collector collector: - image: otel/opentelemetry-collector:0.13.0 + image: otel/opentelemetry-collector:0.16.0 # image: otel/opentelemetry-collector:latest command: ["--config=/conf/collector-config.yaml", "--log-level=DEBUG"] volumes: - ./collector-config.yaml:/conf/collector-config.yaml ports: - "9464:9464" - - "55680:55680" + - "4317:4317" - "55681:55681" depends_on: - zipkin-all-in-one diff --git a/packages/opentelemetry-exporter-collector-grpc/README.md b/packages/opentelemetry-exporter-collector-grpc/README.md index a48e2fae3e..c8a40fd68a 100644 --- a/packages/opentelemetry-exporter-collector-grpc/README.md +++ b/packages/opentelemetry-exporter-collector-grpc/README.md @@ -24,7 +24,7 @@ const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-g const collectorOptions = { serviceName: 'basic-service', - url: '' // url is optional and can be omitted - default is localhost:55680 + url: '' // url is optional and can be omitted - default is localhost:4317 }; const provider = new BasicTracerProvider(); @@ -45,7 +45,7 @@ const { CollectorTraceExporter } = require('@opentelemetry/exporter-collector-g const collectorOptions = { serviceName: 'basic-service', - url: '', // url is optional and can be omitted - default is localhost:55680 + url: '', // url is optional and can be omitted - default is localhost:4317 credentials: grpc.credentials.createSsl( fs.readFileSync('./ca.crt'), fs.readFileSync('./client.key'), @@ -74,7 +74,7 @@ metadata.set('k', 'v'); const collectorOptions = { serviceName: 'basic-service', - url: '', // url is optional and can be omitted - default is localhost:55680 + url: '', // url is optional and can be omitted - default is localhost:4317 metadata, // // an optional grpc.Metadata object to be sent with each request }; diff --git a/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts b/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts index 33fd740f10..9e2417805e 100644 --- a/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts +++ b/packages/opentelemetry-exporter-collector-grpc/src/CollectorMetricExporter.ts @@ -23,7 +23,7 @@ import { CollectorExporterConfigNode, ServiceClientType } from './types'; import { CollectorExporterNodeBase } from './CollectorExporterNodeBase'; const DEFAULT_SERVICE_NAME = 'collector-metric-exporter'; -const DEFAULT_COLLECTOR_URL = 'localhost:55680'; +const DEFAULT_COLLECTOR_URL = 'localhost:4317'; /** * Collector Metric Exporter for Node diff --git a/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts b/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts index 2b607aaba6..da36d28c80 100644 --- a/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts +++ b/packages/opentelemetry-exporter-collector-grpc/src/CollectorTraceExporter.ts @@ -23,7 +23,7 @@ import { import { CollectorExporterConfigNode, ServiceClientType } from './types'; const DEFAULT_SERVICE_NAME = 'collector-trace-exporter'; -const DEFAULT_COLLECTOR_URL = 'localhost:55680'; +const DEFAULT_COLLECTOR_URL = 'localhost:4317'; /** * Collector Trace Exporter for Node diff --git a/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts b/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts index 8a80a336ac..ca2e8767a7 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/CollectorMetricExporter.test.ts @@ -229,7 +229,7 @@ describe('CollectorMetricExporter - node (getDefaultUrl)', () => { it('should default to localhost', done => { const collectorExporter = new CollectorMetricExporter({}); setTimeout(() => { - assert.strictEqual(collectorExporter['url'], 'localhost:55680'); + assert.strictEqual(collectorExporter['url'], 'localhost:4317'); done(); }); }); diff --git a/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts b/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts index e27623d6c7..365eb91e3e 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/CollectorTraceExporter.test.ts @@ -194,7 +194,7 @@ describe('CollectorTraceExporter - node (getDefaultUrl)', () => { it('should default to localhost', done => { const collectorExporter = new CollectorTraceExporter({}); setTimeout(() => { - assert.strictEqual(collectorExporter['url'], 'localhost:55680'); + assert.strictEqual(collectorExporter['url'], 'localhost:4317'); done(); }); }); From cad70e4d8e19fe3da17e3cc6a983698b4adb60f4 Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Tue, 8 Dec 2020 22:49:00 +0100 Subject: [PATCH 02/10] docs: change version collector --- packages/opentelemetry-exporter-collector-grpc/README.md | 2 +- packages/opentelemetry-exporter-collector-grpc/test/helper.ts | 4 +++- packages/opentelemetry-exporter-collector-proto/README.md | 2 +- .../opentelemetry-exporter-collector-proto/test/helper.ts | 4 +++- packages/opentelemetry-exporter-collector/README.md | 2 +- packages/opentelemetry-exporter-collector/test/helper.ts | 4 +++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/opentelemetry-exporter-collector-grpc/README.md b/packages/opentelemetry-exporter-collector-grpc/README.md index c8a40fd68a..fc22a83308 100644 --- a/packages/opentelemetry-exporter-collector-grpc/README.md +++ b/packages/opentelemetry-exporter-collector-grpc/README.md @@ -6,7 +6,7 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] -This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.6.0**. +This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.16.0**. ## Installation diff --git a/packages/opentelemetry-exporter-collector-grpc/test/helper.ts b/packages/opentelemetry-exporter-collector-grpc/test/helper.ts index a45eecff16..55018273c2 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/helper.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/helper.ts @@ -87,7 +87,9 @@ export function mockObserver( return metric; } -export function mockValueRecorder(): metrics.Metric & +export function mockValueRecorder(): metrics.Metric< + metrics.BoundValueRecorder +> & api.ValueRecorder { const name = 'int-recorder'; const metric = diff --git a/packages/opentelemetry-exporter-collector-proto/README.md b/packages/opentelemetry-exporter-collector-proto/README.md index 64c10d1db3..054b37ba07 100644 --- a/packages/opentelemetry-exporter-collector-proto/README.md +++ b/packages/opentelemetry-exporter-collector-proto/README.md @@ -6,7 +6,7 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] -This module provides exporter for node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.6.0**. +This module provides exporter for node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.16.0**. ## Installation diff --git a/packages/opentelemetry-exporter-collector-proto/test/helper.ts b/packages/opentelemetry-exporter-collector-proto/test/helper.ts index a2edcfd9f4..116253205d 100644 --- a/packages/opentelemetry-exporter-collector-proto/test/helper.ts +++ b/packages/opentelemetry-exporter-collector-proto/test/helper.ts @@ -67,7 +67,9 @@ export function mockObserver( return metric; } -export function mockValueRecorder(): metrics.Metric & +export function mockValueRecorder(): metrics.Metric< + metrics.BoundValueRecorder +> & api.ValueRecorder { const name = 'int-recorder'; const metric = diff --git a/packages/opentelemetry-exporter-collector/README.md b/packages/opentelemetry-exporter-collector/README.md index d0a6ffb90f..c817dd7a0d 100644 --- a/packages/opentelemetry-exporter-collector/README.md +++ b/packages/opentelemetry-exporter-collector/README.md @@ -6,7 +6,7 @@ [![devDependencies][devDependencies-image]][devDependencies-url] [![Apache License][license-image]][license-image] -This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.12.0**. +This module provides exporter for web and node to be used with [opentelemetry-collector][opentelemetry-collector-url] - last tested with version **0.16.0**. ## Installation diff --git a/packages/opentelemetry-exporter-collector/test/helper.ts b/packages/opentelemetry-exporter-collector/test/helper.ts index b451bd1443..31f5e1316a 100644 --- a/packages/opentelemetry-exporter-collector/test/helper.ts +++ b/packages/opentelemetry-exporter-collector/test/helper.ts @@ -127,7 +127,9 @@ export function mockUpDownSumObserver( return metric; } -export function mockValueRecorder(): metrics.Metric & +export function mockValueRecorder(): metrics.Metric< + metrics.BoundValueRecorder +> & api.ValueRecorder { const name = 'int-recorder'; const metric = From b9e4e79e1cd2f123cdcd28e44b0968f2d38dc664 Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Tue, 8 Dec 2020 23:40:49 +0100 Subject: [PATCH 03/10] fix: linter error --- packages/opentelemetry-web/src/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/opentelemetry-web/src/utils.ts b/packages/opentelemetry-web/src/utils.ts index 6b94959f96..385cb1d05f 100644 --- a/packages/opentelemetry-web/src/utils.ts +++ b/packages/opentelemetry-web/src/utils.ts @@ -125,7 +125,9 @@ export function getResource( startTimeHR: api.HrTime, endTimeHR: api.HrTime, resources: PerformanceResourceTiming[], - ignoredResources: WeakSet = new WeakSet(), + ignoredResources: WeakSet = new WeakSet< + PerformanceResourceTiming + >(), initiatorType?: string ): PerformanceResourceTimingInfo { // de-relativize the URL before usage (does no harm to absolute URLs) From 366e266947c1c96b32d2e805914b9d4c030a0f2b Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Fri, 18 Dec 2020 22:11:07 +0100 Subject: [PATCH 04/10] fix: lint helper --- packages/opentelemetry-exporter-collector-grpc/protos | 2 +- packages/opentelemetry-exporter-collector-proto/protos | 2 +- packages/opentelemetry-exporter-collector/test/helper.ts | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/opentelemetry-exporter-collector-grpc/protos b/packages/opentelemetry-exporter-collector-grpc/protos index 59c488bfb8..313a868be2 160000 --- a/packages/opentelemetry-exporter-collector-grpc/protos +++ b/packages/opentelemetry-exporter-collector-grpc/protos @@ -1 +1 @@ -Subproject commit 59c488bfb8fb6d0458ad6425758b70259ff4a2bd +Subproject commit 313a868be259dce6c6516dd417d3ad5fd3321acf diff --git a/packages/opentelemetry-exporter-collector-proto/protos b/packages/opentelemetry-exporter-collector-proto/protos index 59c488bfb8..313a868be2 160000 --- a/packages/opentelemetry-exporter-collector-proto/protos +++ b/packages/opentelemetry-exporter-collector-proto/protos @@ -1 +1 @@ -Subproject commit 59c488bfb8fb6d0458ad6425758b70259ff4a2bd +Subproject commit 313a868be259dce6c6516dd417d3ad5fd3321acf diff --git a/packages/opentelemetry-exporter-collector/test/helper.ts b/packages/opentelemetry-exporter-collector/test/helper.ts index 2e734dda73..15ec673ad0 100644 --- a/packages/opentelemetry-exporter-collector/test/helper.ts +++ b/packages/opentelemetry-exporter-collector/test/helper.ts @@ -127,10 +127,7 @@ export function mockUpDownSumObserver( return metric; } -export function mockValueRecorder(): metrics.Metric< - metrics.BoundValueRecorder -> & - api.ValueRecorder { +export function mockValueRecorder(): metrics.Metric & api.ValueRecorder { const name = 'int-recorder'; const metric = meter['_metrics'].get(name) || From 44e91a587f99e4a5d67e112004b50499043a5882 Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Fri, 18 Dec 2020 22:17:34 +0100 Subject: [PATCH 05/10] fix: lint helper --- packages/opentelemetry-exporter-collector/test/helper.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/opentelemetry-exporter-collector/test/helper.ts b/packages/opentelemetry-exporter-collector/test/helper.ts index 15ec673ad0..2e734dda73 100644 --- a/packages/opentelemetry-exporter-collector/test/helper.ts +++ b/packages/opentelemetry-exporter-collector/test/helper.ts @@ -127,7 +127,10 @@ export function mockUpDownSumObserver( return metric; } -export function mockValueRecorder(): metrics.Metric & api.ValueRecorder { +export function mockValueRecorder(): metrics.Metric< + metrics.BoundValueRecorder +> & + api.ValueRecorder { const name = 'int-recorder'; const metric = meter['_metrics'].get(name) || From e8040a218f67927e180023d0929fa375fa927e6e Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Fri, 18 Dec 2020 22:22:49 +0100 Subject: [PATCH 06/10] fix: lint helper --- packages/opentelemetry-exporter-collector/test/helper.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/opentelemetry-exporter-collector/test/helper.ts b/packages/opentelemetry-exporter-collector/test/helper.ts index 2e734dda73..1d45c2dfaf 100644 --- a/packages/opentelemetry-exporter-collector/test/helper.ts +++ b/packages/opentelemetry-exporter-collector/test/helper.ts @@ -127,9 +127,7 @@ export function mockUpDownSumObserver( return metric; } -export function mockValueRecorder(): metrics.Metric< - metrics.BoundValueRecorder -> & +export function mockValueRecorder(): metrics.Metric & api.ValueRecorder { const name = 'int-recorder'; const metric = From 9a1e15f94babb4619ae371b5ce440c832f94cbea Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Sat, 19 Dec 2020 22:21:26 +0100 Subject: [PATCH 07/10] fix: protos --- packages/opentelemetry-exporter-collector-grpc/protos | 2 +- packages/opentelemetry-exporter-collector-proto/protos | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/opentelemetry-exporter-collector-grpc/protos b/packages/opentelemetry-exporter-collector-grpc/protos index 313a868be2..59c488bfb8 160000 --- a/packages/opentelemetry-exporter-collector-grpc/protos +++ b/packages/opentelemetry-exporter-collector-grpc/protos @@ -1 +1 @@ -Subproject commit 313a868be259dce6c6516dd417d3ad5fd3321acf +Subproject commit 59c488bfb8fb6d0458ad6425758b70259ff4a2bd diff --git a/packages/opentelemetry-exporter-collector-proto/protos b/packages/opentelemetry-exporter-collector-proto/protos index 313a868be2..59c488bfb8 160000 --- a/packages/opentelemetry-exporter-collector-proto/protos +++ b/packages/opentelemetry-exporter-collector-proto/protos @@ -1 +1 @@ -Subproject commit 313a868be259dce6c6516dd417d3ad5fd3321acf +Subproject commit 59c488bfb8fb6d0458ad6425758b70259ff4a2bd From 396df7439cb146483c0a94d2a6eb83602c4e9469 Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Sat, 19 Dec 2020 23:47:07 +0100 Subject: [PATCH 08/10] fix: linter --- packages/opentelemetry-web/src/utils.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/opentelemetry-web/src/utils.ts b/packages/opentelemetry-web/src/utils.ts index 385cb1d05f..6b94959f96 100644 --- a/packages/opentelemetry-web/src/utils.ts +++ b/packages/opentelemetry-web/src/utils.ts @@ -125,9 +125,7 @@ export function getResource( startTimeHR: api.HrTime, endTimeHR: api.HrTime, resources: PerformanceResourceTiming[], - ignoredResources: WeakSet = new WeakSet< - PerformanceResourceTiming - >(), + ignoredResources: WeakSet = new WeakSet(), initiatorType?: string ): PerformanceResourceTimingInfo { // de-relativize the URL before usage (does no harm to absolute URLs) From 77d3009e20ca307f134917b6b097c0fb7293e80c Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Sun, 20 Dec 2020 00:06:47 +0100 Subject: [PATCH 09/10] fix: linter --- packages/opentelemetry-exporter-collector-grpc/test/helper.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/opentelemetry-exporter-collector-grpc/test/helper.ts b/packages/opentelemetry-exporter-collector-grpc/test/helper.ts index 6fc1a15aa2..a425e5de93 100644 --- a/packages/opentelemetry-exporter-collector-grpc/test/helper.ts +++ b/packages/opentelemetry-exporter-collector-grpc/test/helper.ts @@ -87,9 +87,7 @@ export function mockObserver( return metric; } -export function mockValueRecorder(): metrics.Metric< - metrics.BoundValueRecorder -> & +export function mockValueRecorder(): metrics.Metric & api.ValueRecorder { const name = 'int-recorder'; const metric = From 42ed3917fd620eb2a2d4472b97901966e9f61bb7 Mon Sep 17 00:00:00 2001 From: Julien FABRE Date: Mon, 21 Dec 2020 20:04:14 +0100 Subject: [PATCH 10/10] fix: linter OK after reinstall all --- .../opentelemetry-exporter-collector-proto/test/helper.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/opentelemetry-exporter-collector-proto/test/helper.ts b/packages/opentelemetry-exporter-collector-proto/test/helper.ts index 116253205d..a2edcfd9f4 100644 --- a/packages/opentelemetry-exporter-collector-proto/test/helper.ts +++ b/packages/opentelemetry-exporter-collector-proto/test/helper.ts @@ -67,9 +67,7 @@ export function mockObserver( return metric; } -export function mockValueRecorder(): metrics.Metric< - metrics.BoundValueRecorder -> & +export function mockValueRecorder(): metrics.Metric & api.ValueRecorder { const name = 'int-recorder'; const metric =