diff options
author | Elizabeth <lizhunt@amazon.com> | 2025-05-28 15:05:38 -0700 |
---|---|---|
committer | Elizabeth <lizhunt@amazon.com> | 2025-05-28 15:05:38 -0700 |
commit | 3005cc83e605fb89b079cf0e6fd0ec95cd27b30e (patch) | |
tree | 992c5933f2ec4a75e32469ddd772c61dbcb2e2fd /u/trace/metrics.ts | |
parent | e3cf820b07e282221502cf2f116c9780b7375e0e (diff) | |
download | ci-3005cc83e605fb89b079cf0e6fd0ec95cd27b30e.tar.gz ci-3005cc83e605fb89b079cf0e6fd0ec95cd27b30e.zip |
Run prettier, add zed settings
Diffstat (limited to 'u/trace/metrics.ts')
-rw-r--r-- | u/trace/metrics.ts | 26 |
1 files changed, 14 insertions, 12 deletions
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<MetricsTraceSupplier> { 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); |