Open ilinas opened 1 year ago
I have a similar use case, my log stream creates multiple partial entries per second and I need to roll them up into a single object emitted at an interval:
readsb_merged:
type: reduce
inputs:
- readsb_raw
group_by:
- hex
flush_period_ms: 1000
merge_strategies:
"*": "retain"
A note for the community
Use Cases
Our applications log in the following format:
There are a lot of these messages, and most of the time they are not very useful, therefore we would like to reduce them by
messageTemplate
as follows:It works for
message
, because it is a known property, and you can specifymerge_strategies
for those. HoweveruserId
andserverId
are properties of a specific message. Other messages will have different parameters, and they can be anything. By default only the first value is preserved.Attempted Solutions
There does not seem to be a way to change default
merge_strategies
for undefined fields.Using wildcards in field names also seems to be unsupported, so
merge_strategies
cannot be defined even if they had some common format likevar_userId
,var_serverId
,var_*
.Proposal
We would like to be able to control default
merge_strategies
for undefined fields.Being able to use wildcards for property names would also be useful.
References
No response
Version
0.30.0