![]() |
VOOZH | about |
Calculated Fields lets you transform and enrich your log data at query time. It behaves like any other log attribute and can be used for search, aggregation, visualization, or even defining additional calculated fields.
There are two types of calculated fields: Extractions and Formulas. Both share the following properties:
# prefix when used in queries, aggregations, or other calculated fields.Use calculated fields in the following scenarios:
If you find that a calculated field is valuable in the long-term, update your log pipelines so your team benefits from automated processing.
You can create a calculated field from two entry points in the Log Explorer: from the Add menu or from within a specific log event or attribute.
This is useful when you are already familiar with the structure and content of the logs and want to quickly define a formula or parsing rule.
This approach is useful for extractions, since it provides a concrete log sample for building a parsing rule.
Formula fields use calculated fields formulas to compute new values from existing attributes. You can:
For example:
#latency_gap = @client_latency - @server_latency
For a complete list of supported syntax, operators, and functions, see Formulas.
Extraction uses Grok parsing rules to capture values from raw log messages or attributes. You can use AI-powered automatic parsing to generate Grok rules or manually define your own Grok patterns. Use Grok rules to:
For example, you can extract the first three words of a message into separate fields:
%{word:first} %{word:second} %{word:third}
Extraction rules are evaluated globally across all logs in your session. For more details and syntax examples, see Extractions.
After you create a calculated field, the Log Explorer updates instantly to show you the new data and give you tools to interact with it. Calculated fields function like log attributes and can be used for search, aggregation, visualization, or defining other calculated fields. Always use the # prefix when referencing a calculated field.
Additional helpful documentation, links, and articles:
| |