-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time based and interval queries for integration with grafana #94
Comments
would grafana be good at automatically setting the interval parameter? (or would it be preferable to have an argument instead like "samples" so you can just say "i want 30 sample spread over this time range"?) |
grafana has some chops here
AND/OR
|
do you need the derived |
Yes; adding a timestamp/unix epoch per data point will allow grafana and other time-series assuming tools to graph it. Calling it
|
I realise now that:
and digging around it looks like a unix epoch would eventually get passed to $ node
> var moment = require('moment')
undefined
> moment.utc(1606304490)
Moment<1970-01-19T14:11:44Z>
> moment.unix(1606304490)
Moment<2020-11-25T11:41:30+00:00> so, for this experiement to work, I think we need |
For consistency, the |
Noting, as I stumbled across this on my explorations: the graphql plugin wants to migrate to a backend, go-based plugin: fifemon/graphql-datasource#34 - it is currently a ui side typescript one. |
I've been playing with the graphql api in https://observablehq.com/d/4e09dcb851b5ed05 – it's a really helpful tool for developing an understanding of the filecoin data model, and for creating useful visualisation of how the state changes over time...
We already have the
Heights
query which allows us to get a contiguous range of epochs... but for longer range queries, you can end up asking for with waaay more data than you need. Something like aninterval
parameter would be nice:Heights(from: Int, to: Int, interval: Int)
- get epochs betweenfrom
amdto
everyinterval
apart.Going further.... heights are a proxy for time that is specific to Filecoin. What if we supported the more universal concept of TIME! This would let us integrate statediff directly with grafana, via https://grafana.com/grafana/plugins/fifemon-graphql-datasource?src=grafana_add_ds
e.g.
basically, can we have the grapql equivelant of these SQL functions: https://github.com/filecoin-project/sentinel-visor/blob/5bef7da1e9a6aead50d6585fc3e08ba582d7c354/storage/migrations/21_height_functions.go#L11-L17
Of note... Once we point grafana at something, it tends to get a lot of queries, and humans love to press the "show me all the date for last year" button... which prompted the suggestion about the interval parameter.
The text was updated successfully, but these errors were encountered: