Skip to content

Commit

Permalink
fix: serialize labels object into string before adding it to the map …
Browse files Browse the repository at this point in the history
…(_batchMap)

Signed-off-by: Naseem <[email protected]>
  • Loading branch information
Naseem committed Jun 1, 2020
1 parent 2a69908 commit a64d472
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/opentelemetry-metrics/src/export/Batcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ export class UngroupedBatcher extends Batcher {
}

process(record: MetricRecord): void {
const labels = record.labels;
const labels = Object.keys(record.labels)
.map(k => `${k}=${record.labels[k]}`)
.join(',');
this._batchMap.set(record.descriptor.name + labels, record);
}
}

0 comments on commit a64d472

Please sign in to comment.