From 11c92903c91e04876b34854c92cc5cc3b5da55ca Mon Sep 17 00:00:00 2001 From: marknguyen1302 Date: Tue, 9 Jul 2024 09:48:27 +0700 Subject: [PATCH] fix: correct telemetry timestamp --- cortex-js/src/domain/telemetry/telemetry.interface.ts | 2 +- .../repositories/telemetry/telemetry.repository.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cortex-js/src/domain/telemetry/telemetry.interface.ts b/cortex-js/src/domain/telemetry/telemetry.interface.ts index 15e330586..3c400b1e6 100644 --- a/cortex-js/src/domain/telemetry/telemetry.interface.ts +++ b/cortex-js/src/domain/telemetry/telemetry.interface.ts @@ -51,7 +51,7 @@ interface ScopeLog { export interface TelemetryLog { traceId: string; - startTimeUnixNano?: string; + timeUnixNano?: string; endTimeUnixNano?: string; severityText: string; body: { diff --git a/cortex-js/src/infrastructure/repositories/telemetry/telemetry.repository.ts b/cortex-js/src/infrastructure/repositories/telemetry/telemetry.repository.ts index 8283037ec..c00fe2b4f 100644 --- a/cortex-js/src/infrastructure/repositories/telemetry/telemetry.repository.ts +++ b/cortex-js/src/infrastructure/repositories/telemetry/telemetry.repository.ts @@ -226,7 +226,7 @@ export class TelemetryRepositoryImpl implements TelemetryRepository { logRecords: [ { traceId: cypto.randomBytes(16).toString('hex'), - startTimeUnixNano: ( + timeUnixNano: ( BigInt(Date.now()) * BigInt(1000000) ).toString(), body: { stringValue: body },