sloth icon indicating copy to clipboard operation
sloth copied to clipboard

Question: how to use multiple error budget windows?

Open r3code opened this issue 2 years ago • 1 comments

Is it possible to use different error budget windows for SLOs?

For example my first service needs 7 day window and the second one 28 days.

For me it looks like I should have two sets of sloth specs and build them as

    # 7 day budget
    sloth generate --input="services/shop/widget_get.slo.yml" --default-slo-period=7d --slo-period-windows-path=./windows 
    sloth generate --input="services/shop/cart_add.slo.yml" --default-slo-period=7d --slo-period-windows-path=./windows 
    # 28 days budget
    sloth generate --input="services/parcel/prediction_get.slo.yml" --default-slo-period=28d --slo-period-windows-path=./windows 

And we can not have one SLO in two windows as alerts do not differentiated by a window. So sloth It generates an alert spec with the same alert name but with a different formula according to the window. We can't merge them.

r3code avatar Mar 23 '23 13:03 r3code

I'm as well very interested in solution for this,

jkutes avatar Apr 25 '23 02:04 jkutes