-
Notifications
You must be signed in to change notification settings - Fork 18
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
add parameterizable duration to retrieve data from prometheus #177
add parameterizable duration to retrieve data from prometheus #177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally config.Interval
should allow formats such as "1w" and be stored as a time.Duration
.
It should be possible to set it from the client side over the DidChangeConfiguration
API.
Also a more descriptive name that indicates what it's used for would be nice.
For the name, yeah I'm agree it's not a super good one. But so far I don't have better. If you have a better one I will replace it :). yeah why not to have a duration instead. Good idea |
Signed-off-by: Augustin Husson <[email protected]>
How about |
Here we go, it should be a bit better now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the things mentioned in the review, adding this new config option will also require updating the package.json
of the VS Code extension.
We could also store the look back interval in the This keeps complexity out of the langserver package and prevents the race condition mentioned above. |
I'm not really in favor of doing the same than the prometheus URL. It doesn't require the same completexity and I prefer that the |
Signed-off-by: Augustin Husson <[email protected]>
Sorry for having worded this in an offensive way. I feel like I should clarify a few things here:
|
Signed-off-by: Augustin Husson <[email protected]>
Signed-off-by: Augustin Husson <[email protected]>
here we go, this one should be fine now. It will remain to update the client of the langserver after that. And then it will need to be released in order to be used in Prometheus. But otherwise normally that should be the end of the changes requested in order to integrate it into Prometheus. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Note: that's the last thing missing to be able to fix back the PR on prometheus side