elastic / elastic/ecs-logging-java
Write SequenceNumber in jboss-logmanager-ecs-formatter
- Lenguaje dominante
- Java
- Estrellas
- 148
- Forks
- 82
- Merge medio
- 2 d 17 h
- PR fusionados (30 d)
- 3
Descripción
Hi,
because the "@timestamp" fields in ECS logging only support millisecond-precision, a sequence number is needed to keep the order of events. Adding this sequence number in FileBeat does not seem possible - only workarounds exist which include disabling multithreading (see https://discuss.elastic.co/t/sequence-number-for-ecs-events-received-by-tcp/291348 ).
Thus, the ECS formatter should add the sequence number ( https://www.elastic.co/guide/en/ecs/current/ecs-event.html#field-event-sequence ).
In case of the `co.elastic.logging.jboss.logmanager.EcsFormatter` this should be trivial as the `ExtLogRecord` from which the JSON is built already includes a method `getSequenceNumber`.
Adding the sequence number would solve a range of other issues regarding to log event order.
Guía de contribución
Línea de trabajo
Comienza en co.elastic.logging.jboss.logmanager.EcsFormatter y sigue cómo se convierte ExtLogRecord en JSON. Comprueba la definición del campo ECS event.sequence y la cobertura de pruebas existente del formatter, que el issue no menciona. Se considera terminado cuando la salida del formatter incluye el número de secuencia del record en la estructura de eventos de ECS.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- observability-sre
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 55/100