Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Jan 29, 2025
1 parent c506c3a commit 3cd4330
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/handlers/otlp_log_push.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ async function handle (req, res) {
}
const labels = stringify(logAttrs)
const fingerprint = fingerPrint(labels)
const ts = BigInt(logRecord.timeUnixNano)
const timestamp = logRecord.timeUnixNano
? BigInt(logRecord.timeUnixNano)
: logRecord.observedTimeUnixNano
? BigInt(logRecord.observedTimeUnixNano)
: BigInt(Date.now()) * BigInt(1000000)
const ts = BigInt(timestamp)
promises.push(bulk.add([[
fingerprint,
ts,
Expand Down

0 comments on commit 3cd4330

Please sign in to comment.