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
{{ message }}
This repository was archived by the owner on Aug 23, 2023. It is now read-only.
Copy file name to clipboardexpand all lines: devdocs/expr.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ So:
126
126
- consolidateBy setting defined closest to the leaf without a special* function in between the setting and the leaf, if available
127
127
- determined via storage-aggregation.conf (defaults to average)
128
128
3) at execution time, the consolidation settings encountered in consolidateBy calls travel up to the root because it is configured on the series, which is passed through the various layers of processing until it hits the root and the output step. This becomes useful in two cases:
129
-
- when series need to be normalized at runtime, e.g. for sumSeries or divideSeries with series that have different steps; they need to be normalized (consolidated) so that the series get a compatible step, and the default of "avg" may not suffice. (note that right now we have alignRequests which normalizes all series at fetch time, which can actually be a bit too eager, because some requests can use multiple targets with different processing - e.g. feed two different series into summarize(), so we actually don't need to normalize at runtime, but in the future we should make this better - TODO)
129
+
- when series need to be normalized at runtime, e.g. for sumSeries or divideSeries with series that have different steps; they need to be normalized (consolidated) so that the series get a compatible step, and the default of "avg" may not suffice. (note that right now we have alignRequests which normalizes all series at fetch time, which can actually be a bit too eager, because some requests can use multiple targets with different processing - e.g. feed two different series into summarize(), so we actually don't need to normalize at runtime, but in the future we should make this better - TODO THIS IS OUT OF DATE)
130
130
- when returning data back to the user via a json response and whatnot, we can consolidate down using the method requested by the user (or average, if not specified). Likewise here, when the setting encounters a special* function while traveling up to the root, the consolidation value is reset to the default (average)
131
131
Note: some functions combine multiple series into a new one (e.g. sumSeries, avgSeries, ...). Your input series may use different consolidateBy settings, some may be explicitly specified while others are not. In this scenario, the output series will be given the first explicitly defined consolidateBy found by iterating the inputs, or the first default otherwise.
Copy file name to clipboardexpand all lines: devdocs/render-request-handling.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,8 @@
12
12
* finds all series by fanning out the query patterns to all other shards.
13
13
this gives basically idx.Node back. has the path, leaf, metricdefinition, schema/aggregation(rollup) settings, for each series, as well as on which node it can be found.
14
14
* construct models.Req objects for each serie. this uses the MKey to identify series, also sets from/to, maxdatapoints, etc.
15
-
*`alignRequests`: this looks at all models.Req objects and aligns them to a common step.
16
-
it selects the archive to use, consolidator settings etc (see NOTES in expr directory for more info)
15
+
*`planRequests`: this plans at all models.Req objects, which means decide which archive to read from, whether to apply normalization, etc
16
+
(see NOTES in expr directory for more info)
17
17
*`getTargets`: gets the data from the local node and peer nodes based on the models.Req objects
18
18
*`mergeSeries`: if there's multiple series with same name/tags, from, to and consolidator (e.g. because there's multiple series because users switched intervals), merge them together into one series
19
19
* Sort each merged series so that the output of a function is well-defined and repeatable.
0 commit comments