Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upPass LookbackDelta as query hint to remote read #4192
Comments
This comment has been minimized.
This comment has been minimized.
|
It's fine to add this, however you don't need to. For instant vector evaluation all you need to do is return the first sample at or before each step. Watch out for 'offset' though. |
This comment has been minimized.
This comment has been minimized.
|
Now I understand more detail. Thanks for your help! |
mtanda
closed this
May 25, 2018
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 22, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
lock
bot
locked and limited conversation to collaborators
Mar 22, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
mtanda commentedMay 24, 2018
Proposal
Related to #4122 .
I'm implementing read adapter.
The read adapter response size could be big, so I reduce size by calculating expected step, and response each datapoints correspond to the step.
Prometheus only accept datapoints in
refTime - lookbackDelta.https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L796
refTime is calculated like
refTime = startTime x n x interval.https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L402
read adapter need response datapoitns which fit in each time bucket.
But, the start time of query range is affected by lookbackDelta.
https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L492
https://github.com/prometheus/prometheus/blob/v2.2.1/promql/engine.go#L476
It is difficult to align data.
If I may misunderstand something, please tell me how I can align the data.