elastic / elastic/ecs-logging-java
Write SequenceNumber in jboss-logmanager-ecs-formatter
- Lingua principale
- Java
- Stelle
- 148
- Fork
- 82
- Merge medio
- 2g 17h
- PR unite (30g)
- 3
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da co.elastic.logging.jboss.logmanager.EcsFormatter e segui come ExtLogRecord viene convertito in JSON. Controlla la definizione del campo ECS event.sequence e la copertura dei test esistente del formatter, che l’issue non indica. Il lavoro è completato quando l’output del formatter include il numero di sequenza del record nella struttura degli eventi ECS.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- observability-sre
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 55/100