Skip to content

Commit b9a75cc

Browse files
committed
Rename PassthroughMetric to LabeledMetric
1 parent 1c11990 commit b9a75cc

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

glean/src/core/metrics/index.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,16 @@ export abstract class MetricType implements CommonMetricData {
178178
}
179179

180180
/**
181-
* This is a no-op internal metric representation.
181+
* This is an internal metric representation for labeled metrics.
182182
*
183183
* This can be used to instruct the validators to simply report
184184
* whatever is stored internally, without performing any specific
185185
* validation.
186+
*
187+
* This needs to live here, instead of labeled.ts, in order to avoid
188+
* a cyclic dependency.
186189
*/
187-
export class PassthroughMetric extends Metric<JSONValue, JSONValue> {
190+
export class LabeledMetric extends Metric<JSONValue, JSONValue> {
188191
constructor(v: unknown) {
189192
super(v);
190193
}

glean/src/core/metrics/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
import { Metric, PassthroughMetric } from "./index";
5+
import { Metric, LabeledMetric } from "./index";
66
import { JSONValue } from "../utils";
77

88
import { BooleanMetric } from "./types/boolean";
@@ -20,7 +20,7 @@ const METRIC_MAP: {
2020
"boolean": BooleanMetric,
2121
"counter": CounterMetric,
2222
"datetime": DatetimeMetric,
23-
"labeled_counter": PassthroughMetric,
23+
"labeled_counter": LabeledMetric,
2424
"string": StringMetric,
2525
"uuid": UUIDMetric,
2626
});

0 commit comments

Comments
 (0)