is there any way to change the value of timestamp field? #20620
-
A note for the community
ProblemThe loki record value timestamp and timestamp in message are different, is there any way to change the value of timestamp? Configuration
Version0.38.0 Debug OutputNo response Example Data{
"status": "success",
"data": {
"resultType": "streams",
"result": [
{
"stream": {
"job": "test"
},
"values": [
[
"1717658642800327233",
"{\"message\":\"hello\",\"timestamp\":1717657763015146042}"
]
]
}
],
"stats": {
"summary": {
"bytesProcessedPerSecond": 6652,
"linesProcessedPerSecond": 130,
"totalBytesProcessed": 51,
"totalLinesProcessed": 1,
"execTime": 0.007666,
"queueTime": 0.000344,
"subqueries": 0,
"totalEntriesReturned": 1,
"splits": 2,
"shards": 0,
"totalPostFilterLines": 1,
"totalStructuredMetadataBytesProcessed": 0
},
"querier": {
"store": {
"totalChunksRef": 0,
"totalChunksDownloaded": 0,
"chunksDownloadTime": 0,
"chunk": {
"headChunkBytes": 0,
"headChunkLines": 0,
"decompressedBytes": 0,
"decompressedLines": 0,
"compressedBytes": 0,
"totalDuplicates": 0,
"postFilterLines": 0,
"headChunkStructuredMetadataBytes": 0,
"decompressedStructuredMetadataBytes": 0
},
"chunkRefsFetchTime": 2816982
}
},
"ingester": {
"totalReached": 6,
"totalChunksMatched": 1,
"totalBatches": 7,
"totalLinesSent": 1,
"store": {
"totalChunksRef": 0,
"totalChunksDownloaded": 0,
"chunksDownloadTime": 0,
"chunk": {
"headChunkBytes": 51,
"headChunkLines": 1,
"decompressedBytes": 0,
"decompressedLines": 0,
"compressedBytes": 0,
"totalDuplicates": 0,
"postFilterLines": 1,
"headChunkStructuredMetadataBytes": 0,
"decompressedStructuredMetadataBytes": 0
},
"chunkRefsFetchTime": 0
}
},
"cache": {
"chunk": {
"entriesFound": 0,
"entriesRequested": 0,
"entriesStored": 0,
"bytesReceived": 0,
"bytesSent": 0,
"requests": 0,
"downloadTime": 0
},
"index": {
"entriesFound": 0,
"entriesRequested": 0,
"entriesStored": 0,
"bytesReceived": 0,
"bytesSent": 0,
"requests": 0,
"downloadTime": 0
},
"result": {
"entriesFound": 0,
"entriesRequested": 0,
"entriesStored": 0,
"bytesReceived": 0,
"bytesSent": 0,
"requests": 0,
"downloadTime": 0
},
"statsResult": {
"entriesFound": 0,
"entriesRequested": 0,
"entriesStored": 0,
"bytesReceived": 0,
"bytesSent": 0,
"requests": 0,
"downloadTime": 0
}
}
}
}
} Additional ContextNo response ReferencesNo response |
Beta Was this translation helpful? Give feedback.
Answered by
jszwedko
Jun 6, 2024
Replies: 1 comment 1 reply
-
I think you may need to remove the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
1123183721
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you may need to remove the
to_unix_timestamp
call so that.timestamp
is an actual timestamp type and not an integer.