Hi everyone,
I’m looking for some guidance regarding OpenPipeline Dynamic Routing and filtering OpenTelemetry array attributes.
I receive log records containing an attribute that is stored as an array, for example:
- [“1”, “2”]
- [“1”]
- [“2”]
- and potentially other values as well. ( equal or not equal )
My goal is to create routing rules based on the content of this array. However, I noticed that in the Dynamic Routing matcher, the array() function is not available and any expression using it returns the following error:
Invalid matching condition. The function `array()` isn’t enabled.
Because of this limitation, I haven’t found a way to validate whether an array contains a specific value or to compare it against a list of expected values.
Has anyone successfully filtered OpenTelemetry array attributes in OpenPipeline Dynamic Routing?
For example:
- Route logs when the array contains “1”
- Route logs when the array contains “2”
- Route logs when the array contains either “1” and “2”
Are there any supported functions, workarounds, transformations, or best practices to achieve this?
Thanks in advance for any suggestions!