fluent / fluent/fluentd-docs-gitbook
Missing docs: Best practice for nested keys in record_transformer with high performance
- Lingua principale
- CSS
- Stelle
- 46
- Fork
- 136
- Merge medio
- 4h 47m
- PR unite (30g)
- 16
Descrizione
The only example in the `record_transformer` docs of a "nested key" is here: https://docs.fluentd.org/filter/record_transformer#enable_ruby and here: https://docs.fluentd.org/filter/record_transformer#use-dig-method-for-nested-field
However, these docs also state:
> By historical reason, enable_ruby true is too slow. If you need this option, consider record_modifier filter instead. See also Need more performance? section.
Both the the aforementioned examples require `enable_ruby`. There are no examples of accessing a nested key on a log without using `enable_ruby`. Is there no way to do nested key access without using `enable_ruby` and paying a performance cost? It would be ideal if something like:
```
@type record_transformer
label1 ${record.dig("kubernetes", "labels", "label1")}
```
I understand that `enable_ruby` is powerful because it allows arbitrary ruby execution, but a simple `k1.k2.k3` (with `.dig()` behavior to handle nulls) would be hugely useful, and could be implemented without the performance hit of arbitrary Ruby.
If this IS indeed possible, the docs should be updated to include an example of this.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia dalle sezioni della documentazione di record_transformer collegate nella issue: enable_ruby e use-dig-method-for-nested-field. Verifica se l’accesso alle chiavi annidate è supportato senza enable_ruby, quindi documenta l’approccio ad alte prestazioni supportato con un esempio, se ne esiste uno; in caso contrario, chiarisci la limitazione e il compromesso in termini di prestazioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- ruby
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100