-
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
Missing a way to use time.Since and pretty format duration in templates #3717
Comments
(I can and likely will add it by myself, if there's no objection) |
No objection from me - this seems sensible. |
Closed
@gotjosh okay I made a PR, can you look into that or ask somebody to review it? (not sure what's the workflow here) |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to be able to use a custom template to display the time the alert started to fire and how much time is it firing for, something like:
⌛ Firing since: 2024-02-12 18:15:38.457 +0000 UTC (for 3 hours 42 minutes 21 seconds)
.We already have .StartsAt field for alert, but there's no template helper to 1) use
time.Since()
, and 2) pretty-format duration, so it would be lovely to have it here as well.The text was updated successfully, but these errors were encountered: