Expressions give the config flexibility by allowing dynamic business logic rules to be included in static configs. Most notably, expressions can be used to route log records and add new fields based on the contents of the log entry being processed.
For reference documentation of the expression language, see here.
Available to the expressions are a few special variables:
body
contains the entry's bodyattributes
contains the entry's attributesresource
contains the entry's resourcetimestamp
contains the entry's timestampenv()
is a function that allows you to read environment variables
- type: metadata
attributes:
stack: 'EXPR(env("STACK"))'