mirror of
https://github.com/grafana/grafana.git
synced 2025-01-15 19:22:34 -06:00
Loki: Add documentation for label
derived field (#80218)
This commit is contained in:
parent
ecc667c9a5
commit
df204a9563
@ -91,9 +91,9 @@ To troubleshoot configuration and other issues, check the log file located at `/
|
||||
|
||||
### Derived fields
|
||||
|
||||
Derived Fields are used to extract new fields from a log message and create a link from the value of the field.
|
||||
Derived Fields are used to extract new fields from your logs and create a link from the value of the field.
|
||||
|
||||
For example, you can link to your tracing backend directly from your logs, or link to a user profile page if the log line contains a corresponding userId.
|
||||
For example, you can link to your tracing backend directly from your logs, or link to a user profile page if the log line contains a corresponding `userId`.
|
||||
These links appear in the [log details][].
|
||||
|
||||
You can add multiple derived fields.
|
||||
@ -106,7 +106,11 @@ Each derived field consists of the following:
|
||||
|
||||
- **Name** - Sets the field name. Displayed as a label in the log details.
|
||||
|
||||
- **Regex** - Defines a regular expression to parse a part of the log message and capture it as the value of the new field. Can contain only one capture group.
|
||||
- **Type** - Defines the type of the derived field. It can be either:
|
||||
|
||||
- **Regex**: A regular expression to parse a part of the log message and capture it as the value of the new field. Can contain only one capture group.
|
||||
|
||||
- **Label**: A label from the selected log line. This can be any type of label - indexed, parsed or structured metadata. The label's value will be used as the value of the derived field.
|
||||
|
||||
- **URL/query** Sets the full link URL if the link is external, or a query for the target data source if the link is internal. You can interpolate the value from the field with the `${__value.raw}` macro.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user