elastic / elastic/ecs-logging-java

Customize the key names like @timestamp

Open
#213 0 comments 0 reactions 0 assignees View on GitHub
agent-java community triage
Dominant language
Java
Stars
148
Forks
82
Avg merge
2d 17h
Merged PRs (30d)
3

Description

Hi,

I want to customize the key names like @timestamp. Because there is a problem with Logstash Parser and @timestamp => https://github.com/logstash-plugins/logstash-filter-date/issues/95

My workaround in the logstash parser:
`mutate { copy => { "@timestamp" => "timestamp_modified" } }
mutate { convert => { "timestamp_modified" => "string" } }
date {
match => [ "timestamp_modified", "ISO8601" ]
tag_on_failure => "_dateparsefailure"
add_tag => [ "date_replaced" ]
}`

The keys are hard coded in https://github.com/elastic/ecs-logging-java/blob/7dbf50e9021725cc53cd75fc7b4de170aeca2c11/ecs-logging-core/src/main/java/co/elastic/logging/EcsJsonSerializer.java#L34

Best
Niklas

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.