From 04dfb20f4a05f28f92b190c4fe88bbb1edb5ef46 Mon Sep 17 00:00:00 2001 From: Peter Davids Date: Wed, 28 Dec 2022 17:33:42 -0500 Subject: [PATCH] whoops use timeInputToHrTime --- packages/sdk-metrics/src/Instruments.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/sdk-metrics/src/Instruments.ts b/packages/sdk-metrics/src/Instruments.ts index 817a96a6dc0..be7f20c377c 100644 --- a/packages/sdk-metrics/src/Instruments.ts +++ b/packages/sdk-metrics/src/Instruments.ts @@ -29,7 +29,7 @@ import { ObservableGauge, ObservableUpDownCounter, } from '@opentelemetry/api'; -import { numberToHrtime } from '@opentelemetry/core'; +import { timeInputToHrTime } from '@opentelemetry/core'; import { InstrumentDescriptor } from './InstrumentDescriptor'; import { ObservableRegistry } from './state/ObservableRegistry'; import { @@ -57,7 +57,7 @@ export class SyncInstrument { ); value = Math.trunc(value); } - this._writableMetricStorage.record(value, attributes, context, numberToHrtime(Date.now())); + this._writableMetricStorage.record(value, attributes, context, timeInputToHrTime(Date.now())); } }