Route
Example Configuration
Split by log level
Config
Input
Output
1[transforms.my_transform_id]
2type = "route"
3
4 [transforms.my_transform_id.route]
5 debug = '.level == "debug"'
6 info = '.level == "info"'
7 warn = '.level == "warn"'
8 error = '.level == "error"'
1{
2 "log": {
3 "level": "info"
4 }
5}
1{
2 "log": {
3 "level": "info"
4 }
5}
Split by metric namespace
Config
Input
Output
1[transforms.my_transform_id]
2type = "route"
3
4 [transforms.my_transform_id.route]
5 app = '.namespace == "app"'
6 host = '.namespace == "host"'
1{
2 "metric": {
3 "counter": {
4 "value": 10000
5 },
6 "kind": "absolute",
7 "name": "memory_available_bytes",
8 "namespace": "host",
9 "tags": {}
10 }
11}
1{
2 "metric": {
3 "counter": {
4 "value": 10000
5 },
6 "kind": "absolute",
7 "name": "memory_available_bytes",
8 "namespace": "host",
9 "tags": {}
10 }
11}
Configuration Options
Required Options
route(required)
A table of route identifiers to logical conditions representing the filter of the route. Each route
can then be referenced as an input by other components with the name <transform_name>.<route_id>
.
Type | Syntax | Default | Example |
---|---|---|---|
hash | remap_boolean_expression | [] |
inputs(required)
A list of upstream source or transform
IDs. Wildcards (*
) are supported.
See configuration for more info.
Type | Syntax | Default | Example |
---|---|---|---|
array | literal | ["my-source-or-transform-id","prefix-*"] |
type(required)
The component type. This is a required field for all components and tells Vector which component to use.
Type | Syntax | Default | Example |
---|---|---|---|
string | literal | ["route"] |
Advanced Options
How it Works
State
This component is stateless, meaning its behavior is consistent across each input.