From 17510db52553114b35b9875654877696d41b6dab Mon Sep 17 00:00:00 2001 From: Bartlomiej Obecny Date: Mon, 24 Aug 2020 18:34:17 +0200 Subject: [PATCH] Collector split (#1446) * chore: removing submodule protos from exporter-collector * chore: adding submodule opentelemetry-proto to exporter collector * chore: fixing submodule path * chore: updating proto to version v0.4.0 * chore: splitting exporter collector into 3 packages - depending on transport layer, updated examples, fixed the metrics collector for proto, fixed bug for label * chore: fixing bug with controller when shutting down * chore: ignored files * chore: fixing submodule links * chore: lint fixes - seems like some latest updates forcing extend to be in new line * chore: lint space * chore: fixing test when waiting to load proto files --- api/.gitignore | 4 ++++ api/src/metrics/NoopMeter.ts | 12 ++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/api/.gitignore b/api/.gitignore index 99005428477..7f151853412 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -78,3 +78,7 @@ package.json.lerna_backup # VsCode configs .vscode/ + +#IDEA +.idea +*.iml diff --git a/api/src/metrics/NoopMeter.ts b/api/src/metrics/NoopMeter.ts index 47df1ab970d..d09a6ba742d 100644 --- a/api/src/metrics/NoopMeter.ts +++ b/api/src/metrics/NoopMeter.ts @@ -131,14 +131,16 @@ export class NoopMetric implements UnboundMetric { } } -export class NoopCounterMetric extends NoopMetric +export class NoopCounterMetric + extends NoopMetric implements Counter { add(value: number, labels: Labels) { this.bind(labels).add(value); } } -export class NoopValueRecorderMetric extends NoopMetric +export class NoopValueRecorderMetric + extends NoopMetric implements ValueRecorder { record( value: number, @@ -156,7 +158,8 @@ export class NoopValueRecorderMetric extends NoopMetric } } -export class NoopBaseObserverMetric extends NoopMetric +export class NoopBaseObserverMetric + extends NoopMetric implements BaseObserver { observation() { return { @@ -166,7 +169,8 @@ export class NoopBaseObserverMetric extends NoopMetric } } -export class NoopBatchObserverMetric extends NoopMetric +export class NoopBatchObserverMetric + extends NoopMetric implements BatchObserver {} export class NoopBoundCounter implements BoundCounter {