-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
chore: use HumanizeTimestamp from prometheus/common #3924
chore: use HumanizeTimestamp from prometheus/common #3924
Conversation
Signed-off-by: Sergey <[email protected]>
@gotjosh since it was you who reviewed my last PR here, can you check or ask someone to do so? |
Seems like the test failing is not mine and should've been caused by my PR right? |
Thanks for PR! I believe that the PR should be retitled "chore: use HumanizeTimestamp from prometheus/common". Also please add the new I'm not quite sure where someone would have the opportunity to use the function in Alertmanager templates? |
@simonpasquier thanks for noticing the PR naming, I updated it. On docs, will also add it a bit later. |
Signed-off-by: Sergey <[email protected]>
@simonpasquier fixed the docs as well |
Got it but the value shouldn't be present in the data accessible to the Alertmanager templates. Or am I missing something? |
@simonpasquier actually yes, haven't thought of that. Do you think it'll be still useful or if I should close it? |
I wouldn't add the function until we have a use case (otherwise it creates unnecessary load for users and maintainers). |
Gotcha, I'll close it then. Will re-add if there's a usecase for it later. |
Adding HumanizeDuration from prometheus/common (moved it there in this PR: prometheus/common#654).
Also copy-pasted some test cases from Prometheus repo.