-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
I have:
left todo:
feedback anyone? @torkelo @shanson7 the per series metadata looks like this now.
|
fb9ddf3
to
f99dfef
Compare
What happens when the request gets proxied to graphite-web? |
graphite-web will not ask metrictank for metadata, so it won't get it, it won't add any by itself, and will return the traditional response format. to make this work with graphite, we need to:
This is a very significant amount of work. I would much rather spend our resources in porting over more graphite functions to metrictank. |
I agree with this sentiment (for a number of reasons) but I think it's worth thinking on. Having Also, the Rollup indicator will not be something that can be relied on, since it won't indicate if the request was proxied (which itself is nice to know). Again, perhaps grafana could make the assumption that the request was handled by graphite proper if the old format was returned. I don't think that initial versions of this feature need to handle this, but perhaps there could be something that metrictank can do on the way back from graphite (since it is proxying the response back) to smooth some of this? |
yes. note that is is already the case for the stats.
right. do you mean it could modify the response and insert a meta section "sorry we don't have any metadata". in my view this is no better than grafana having an additional indicator state for "no metadata available" ? |
Yeah, something like that. It could indicate in a canonical format that the request was, in fact, proxied. It wouldn't really help with the rollup indication, but it would provide some context. I'm not saying it should be done this way, just trying to discuss options |
e278eb4
to
409a490
Compare
this allows us to represent it smaller in memory
properties regarding: fetch, normalization, function processing, and runtime consolidation.
3af4ea8
to
08c858c
Compare
feedback from awoods:
|
|
because our messagepack library doesn't like (de)serializing maps with non-string keys. This is equivalent and avoids serializing or interop issues with json.
* update docs to include tags and meta section * fix a bunch of bugs where previously data wasn't being deeply copied * cleanly copy the meta section where needed * clean up code with some helper functions
* fix cases where QueryFrom/QueryTo was not being set * simplify code * don't like constructing new series listing all properties explicitly, because when we add a new series property, it can be forgotten or we must update all render functions
as described in devdocs/expr.md
53f9229
to
de2322e
Compare
force push to take out this commit:
|
Co-Authored-By: Anthony Woods <awoods@grafana.com>
fix #1091
Here's my vision:
for every series, there's a SeriesSource. The SeriesSource describes how the data was generated through the concept of SeriesSourceProperties (which describe which storage-schemas rules applied to our data, which archive we read from, what kind of normalization and runtime consolidation was applied) along with a count of series for those properties.
In the most simple case (fetching 1 timeseries, and not running a function like sumSeries() or no merging together because of an interval change), the source is only one set of properties with a count of 1.
When things get interesting (mergeSeries, sumSeries(), etc) is when we need to combine multiple series to create one new output series. in all these cases we merge the SeriesSources together, adding up the counts based on their SeriesSourceProperties.
Ultimately then, for any series returned in the http response body, we know if it was composed out of just 1 source timeseries or multiple, and how they were generated.
Conceptually I think it's fairly simple. the main challenge is updating all processing functions accordingly (for now i've only done a few to showcase the idea) and making sure not to make any permanent changes to SeriesSource maps when we may reuse series in the processing pipeline
the output format for now looks like so:
(notice how we already had response-global metadata, and now we're adding per series metadata under "source")
note that instead of (or in addition to) schema-id i plan to return the actual schemas rule being used.
cc @torkelo