This commit is contained in:
akvlad
2025-01-29 13:36:45 +02:00
parent c506c3acb7
commit 3cd4330089

View File

@ -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,