- 0 minutes to read
Formula - ContextKey
Use the contextKey
Formula function with a regular expression to extract matching Key-names from the Log Event context (Key-Value collection).
Quick example
Let's get you started with the following example (Get all Keys matching the provided regular expression)
Input | Expression | Result |
---|---|---|
|
|
|
Text Data | Context | Unique values |
Features
- Extracts all Key names from the Key-Value collection (Context)
How to use
To configure the Formula plugin with the contextKey function:
- Select Formula as the expression type plugin.
- Write down the expression to use in the 'Expression' text area with the named Key to extract
contextKey(regex('Order#.*'))
- The Context Key names are displayed in the Message Context tab
- The result is displayed
Syntax
The contextKey function has the following syntax:
contextKey(regex('Expression'))
Next Step
How to Add or manage Search Fields
How to Add or manage Log Views
Related
Expression Type Plugins are used in Search Fields
What are Search Fields?
What are Search Field Expressions?
What are Message Types?
What are Log Views?