Skip to main content
This information is for Chronosphere Telemetry Pipeline, which is a standalone product separate from Chronosphere Observability Platform.
The flatten subrecord processing rule uses regular expressions to search for key/value pairs inside a JSON object, then either moves or copies any applicable key/value pairs to the top level of the record.

Configuration parameters

Use the parameters in this section to configure the . The Telemetry Pipeline web interface uses the items in the Name column to describe these parameters. Pipeline configuration files use the items in the Key column as YAML keys.

Examples

Using the flatten subrecord rule lets you restructure your telemetry data by pulling key/value pairs out of a nested object and storing them as flat data at the record’s root.

Move key/value pairs

For example, given this sample log data:
A processing rule with the Key value $user.account, the Regex value id, and the Replacement key value user.%1 returns the following result:
This rule searched for applicable key/value pairs inside the account object, moved id up into a new key named user.id at the record’s top level, and then removed account and the key/value pairs it originally contained.

Copy key/value pairs

You can also use the Keep original setting to copy key/value pairs out of an object instead of moving them. For example, given this sample log data:
A processing rule with the Key value $user.account, the Regex value id, the Replacement key value user.%1, and the Keep original setting enabled returns the following result:
This rule searched for applicable key/value pairs inside the account object, copied id into a new key named user.id at the record’s top level, but did not remove account and the key/value pairs it originally contained. For a processing rule with a similar effect, see lift submap. For a processing rule with the opposite effect, see nest keys.