Skip to content
Discussion options

You must be logged in to vote

Even without that remap got the same behaviour. I am wondering if log_to_metric does not allow timestamp override and considers always time of ingestion.

Hello, I looked at the implementation. Code is here: https://github.com/vectordotdev/vector/blob/master/src/transforms/log_to_metric.rs#L786-L790

The log_to_metric transform should use the timestamp from the log. If a timestamp is not set, it will use now(). Maybe when you were testing this, the log didn't have a timestamp or it was not at the expected path. There are also unit tests for this but an easy way to verify is to override the timestamp and check the end result:

[transforms.remap]
type = "remap"
inputs = ["nifi"]
source = '''…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@bmgante
Comment options

@xtrime-ru
Comment options

@pront
Comment options

pront Sep 4, 2025
Maintainer

Answer selected by pront
@xtrime-ru
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
transform: log_to_metric Anything `log_to_metric` transform related domain: codecs Anything related to Vector's codecs (encoding/decoding)
3 participants