Skip to content

Commit

Permalink
Collector split (open-telemetry#1446)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
obecny authored and dyladan committed Feb 18, 2021
1 parent b4f3a42 commit 17510db
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
4 changes: 4 additions & 0 deletions api/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ package.json.lerna_backup

# VsCode configs
.vscode/

#IDEA
.idea
*.iml
12 changes: 8 additions & 4 deletions api/src/metrics/NoopMeter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,16 @@ export class NoopMetric<T> implements UnboundMetric<T> {
}
}

export class NoopCounterMetric extends NoopMetric<BoundCounter>
export class NoopCounterMetric
extends NoopMetric<BoundCounter>
implements Counter {
add(value: number, labels: Labels) {
this.bind(labels).add(value);
}
}

export class NoopValueRecorderMetric extends NoopMetric<BoundValueRecorder>
export class NoopValueRecorderMetric
extends NoopMetric<BoundValueRecorder>
implements ValueRecorder {
record(
value: number,
Expand All @@ -156,7 +158,8 @@ export class NoopValueRecorderMetric extends NoopMetric<BoundValueRecorder>
}
}

export class NoopBaseObserverMetric extends NoopMetric<BoundBaseObserver>
export class NoopBaseObserverMetric
extends NoopMetric<BoundBaseObserver>
implements BaseObserver {
observation() {
return {
Expand All @@ -166,7 +169,8 @@ export class NoopBaseObserverMetric extends NoopMetric<BoundBaseObserver>
}
}

export class NoopBatchObserverMetric extends NoopMetric<void>
export class NoopBatchObserverMetric
extends NoopMetric<void>
implements BatchObserver {}

export class NoopBoundCounter implements BoundCounter {
Expand Down

0 comments on commit 17510db

Please sign in to comment.