-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Allow math on label_format expressions #2955
Comments
So an example using that might be like this?:
Also what about cases where the value of the label isn't fully known, for example with a duration field. Status has a fixed number of values (0-599 roughly speaking) so it's reasonable to just divide by 100. With a duration, we can do something similar, but what if we wanted to have a fixed number of buckets for a field with an unknown range of values. Or what if we wanted to have an unspecified amount of fixed size bucket, or a specific amount of fixed size buckets, with overflow going into the last bucket (or a spill-over bucket?). |
It'll probably be helpful to expose the ability to clamp values to |
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Not stale. After holidays discussion can continue. |
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
Not stale |
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
@owen-d can we get a keep alive label? |
I would suggest we open up
label_format
stages to allow mathematical operations. For instance, say you wanted counts based on status code groups (2xx, 4xx, etc).I'd like to use something like this, taking into account integer division to do the grouping:
| json | status="{{.status / 100}}"
/cc @cyriltovena @chancez WDYT?
The text was updated successfully, but these errors were encountered: