Elasticsearch sink always using Kafka timestamp as @timestamp #22879
Labels
sink: elasticsearch
Anything `elasticsearch` sink related
source: kafka
Anything `kafka` source related
type: bug
A code related bug.
A note for the community
Problem
When using the Elasticsearch sink
data_stream
mode, Vector has a remap method to create the ELK@timestamp
field before pushing the event:vector/src/sinks/elasticsearch/sink.rs
Lines 118 to 121 in 7cfc9c5
vector/src/sinks/elasticsearch/config.rs
Lines 419 to 428 in 7cfc9c5
However, I've found that
@timestamp
value is always the Kafka message time (i.e.%kafka.timestamp
), even if the global timestamp field is set to anything else:Which I would expect to change
timestamp_key = "custom_time"
atremap_timestamp
method, so its value is used for the new@timestamp
.Right now, to bypass this situation, I'm manually overwriting
%kafka.timestamp
in a transform:Configuration
Version
0.46
Debug Output
Example Data
Event ingested at the Kafka topic:
Vector's console output:
Resulting Elasticsearch document:
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: