From 3005cc83e605fb89b079cf0e6fd0ec95cd27b30e Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Wed, 28 May 2025 15:05:38 -0700 Subject: Run prettier, add zed settings --- u/trace/metrics.ts | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'u/trace/metrics.ts') diff --git a/u/trace/metrics.ts b/u/trace/metrics.ts index 4ddde06..f57b725 100644 --- a/u/trace/metrics.ts +++ b/u/trace/metrics.ts @@ -32,8 +32,10 @@ export interface IEmittableMetric { } export class EmittableMetric implements IEmittableMetric { - constructor(public readonly name: string, public readonly unit: Unit) { - } + constructor( + public readonly name: string, + public readonly unit: Unit, + ) {} public withValue(value: number): MetricValue { return { @@ -105,16 +107,16 @@ export class MetricsTrace implements ITrace { return this; } - const foundMetricValues = this.tracing.flatMap(( - [tracing, startedTracing], - ) => - [tracing, ...tracing.children()] - .filter((_tracing) => metric === _tracing) - .flatMap((metric) => [ - this.addMetric(metric, startedTracing), - this.addMetric(tracing, startedTracing), - ]) - ).flatMap((values) => values); + const foundMetricValues = this.tracing + .flatMap(([tracing, startedTracing]) => + [tracing, ...tracing.children()] + .filter((_tracing) => metric === _tracing) + .flatMap((metric) => [ + this.addMetric(metric, startedTracing), + this.addMetric(tracing, startedTracing), + ]), + ) + .flatMap((values) => values); if (foundMetricValues.length === 0) { return this._nowTracing(metric); -- cgit v1.2.3-70-g09d2