Our proposed stream configuration syntax for configuring value-based sampling looks like this:
Supported filters include:
- ['==', x]
- ['!=', x]
- ['<', x]
- ['>', x]
- ['<=', x]
- ['>=', x]
- ['in', [x, y, z]]
- ['not_in', [x, y, z]]
- ['contains', x]
- ['contains_all', [x, y, z]]
- ['contains_any', [x, y, z]]
Example config:
"very.cool.stream": { "producer": { "metrics_platform_client": { [...] "filter": { // Only events matching these filters get sent "user_is_logged_in": [ "==", true ], "mediawiki_skin" : [ "in", [ "Vector", "MinervaNeue" ] ] } } } }
This 1x2 array format with arbitrary member types is fine for a dynamically typed language like JavaScript but is more cumbersome for more strongly typed languages like Java and Swift. This task is to decide on a modified syntax that is friendlier to those languages.