You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thinking about how you could join across groups of the same measurement.
Joining across measurements is straight forward and documented.
How would you join two different groups from the same measurement? Do you even need to? I think so and I think you may want to do it dynamically as well.
Proposed solution:
.joinOnGroups(<group_selector or star>, ...)
A group select could just be { 'dim1' : 'value1', 'dim2': 'value2'} etc.
The number of arguments to joinObGroups indicates how many series are joined,
A * indicates all groups.
For example:
stream
.from('errors')
.groupBy('page', 'section')
// do some work
.joinOnGroups({'page' : 'home', 'section':'sidebar'}, *)
.as('home', 'other')
// do more work on the joined data.
This would join the home page sidebar section with every other page section group. Producing a new groups with tags like:
This feature is pretty useful for my use case, I am currently creating alerts that looks on multiple instances and check their status relatively to other (for example: checking distribution of data/users between instances from the same type -> "all web servers should divide the users count euqaly").
So in my use case I can:
stream.from('users_count').groupBy('type').joinOnGroups(*).as('app1', 'app2')
// do some alert for (app1 / (app1.users_count + app2.users_count) / 2 (numbers of instance)) or app2.
Explanation of the calculation: to see if one instance has more than average user count and to alert on it.
Thinking about how you could join across groups of the same measurement.
Joining across measurements is straight forward and documented.
How would you join two different groups from the same measurement? Do you even need to? I think so and I think you may want to do it dynamically as well.
Proposed solution:
A group select could just be
{ 'dim1' : 'value1', 'dim2': 'value2'}
etc.The number of arguments to
joinObGroups
indicates how many series are joined,A
*
indicates all groups.For example:
This would join the home page sidebar section with every other page section group. Producing a new groups with tags like:
Seems like manipulating tags like we do fields with dot separators is a simple solution.
Going to think on this some more but it feels like a good start.
The text was updated successfully, but these errors were encountered: