24 Apr 2024 06:21 PM - last edited on 10 May 2024 03:48 PM by Michal_Gebacki
I'm trying to create an SLO based off the load times for a single step in a clickpath synthetic. Its basically % of requests that load in less than a defined time. I cannot figure out how to create calculated metrics successful request count or total request count for the SLO calculation as I would for a service based response time SLO. Has anyone had success with a similar requirement?
24 Apr 2024 11:19 PM - edited 24 Apr 2024 11:30 PM
Hi Paul,
You might wanna use the partition transformation in your metric selector.
https://docs.dynatrace.com/docs/shortlink/api-metrics-v2-selector#partition
Here's a quick example:
Say you have this data but only want to count the # of requests above a certain load time (let's say 3s):
You'd have to use partition to split that data into a new dimension (let's call it "Category):
builtin:synthetic.browser.event.actionDuration.load
:splitBy("dt.entity.synthetic_test_step"):auto
:partition("Category",
value("good",lt(3000)),
value("bad",gt(3000)))
:filter(and(or(in("dt.entity.synthetic_test_step",entitySelector("type(synthetic_test_step),entityName.equals(~"click on ~~~"Finish~~~"~")")))))
:sort(value(auto,descending))
:limit(20)
And filter only the dimension you want:
:filter(eq("Category","bad"))
If you want to create an SLO based off of that just take the count() of those values and divide it between the total load actions.
Hope it helps!