Functions
SignalFlex provides built-in functions that you can use to build transform. If these functions are not enough, you can also write customized Javascript functions to transform event data.
When configuring transform function, you'll notice that certain options take field paths as values. In order to reference nested, or array, values you can use SignalFlex's field path notation. Simply uses
.
and [<index>]
to access nested and array values, respectively.For this example let's use the following
log
event:{
"timestamp": "2020-07-30T01:22:23.223Z",
"message": "Signalflex example",
"level": "INFO",
"metadata": {
"container_id": "err4rf4f",
"tags": ["tag1: value1", "tag2: value1"]
}
}
We can access the values like so:
"level"
- Accesses the root levellevel
field."metadata.container_"
- Accesses the childcontainer_id
field."metadata.tags[0]"
- Accesses the first value in thetags
field insidemetadata
.
Last modified 2yr ago