Metric to Log Timestamp gets overwritten? How to preserve log timestamp when converting to metric and sending using prometheus remote write? #22722
Unanswered
generate-me12
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm trying to use log_to_metric transformation. These are logs have timestamps that aren't current such as
2025-03-24T18:53:01.419106546Z
These are metrics that were converted to logs to be stored in an s3 bucket, I am then ingesting these logs from s3 and I converting them to metrics and then sending them to Amazon Prometheus using prometheus_remote_write.This is how I'm converting the log to metrics:
I notice when I notice that log_to_metric transform sets the metric timestamps to the current timestamp the metric is converted. I tried adding a remap after this to change the timestamp back using
.timestamp = parse_timestamp!(.tags.log_timestamp, "%Y-%m-%dT%H:%M:%S%.9fZ")
but I notice that when I use prometheus_remote_write to send to prometheus, the timestamp shows as the current timestamp.
Does both log_to_metric and prometheus_remote_write alter the timestamp?
Beta Was this translation helpful? Give feedback.
All reactions