grafana/public/app/plugins
Zodan Jodan 53758ad764
Loki: Option to add derived fields based on labels (#76162)
* Plugin: Deriving fields by name from parsed logs

Loki only derives fields by a regex matcher, this limits its usage when functions such as `line_formatter` is used on
top of the logs.
Some users already have logs parsed in json or logfmt structure which are detected as fields in loki.
This pull request allows the mapping between detected fields values and derived values by matching the fields' names.
Currently the feature is behind `lokiEnableNameMatcherOption` feature toggle.

* improve settings page to have a `fieldType`

* improve derived fields getter to use `matcherRegex`

* fix failing test

* rename feature toggle to `lokiDerivedFieldsFromLabels`

* added suggestions from review

* add empty config object

* remove feature flag

* fix width of select

* default to `regex` derived field

* fix failing test

---------

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
2023-11-14 15:06:02 +01:00
..
datasource Loki: Option to add derived fields based on labels (#76162) 2023-11-14 15:06:02 +01:00
panel Tempo: Fix missing deep span link (#77936) 2023-11-13 11:10:19 +00:00
gen.go Kindsys: update generated doc and add check in CI (#71871) 2023-07-20 11:48:12 +02:00
sdk.ts Chore: ESlint import order (#44959) 2022-04-22 14:33:13 +01:00