07 Dec 2025 11:20 PM - edited 07 Dec 2025 11:21 PM
I want to create a time-series chart in Dynatrace that shows the number of successful API hits for today and compares it to the same day last week (aligned by time of day).
I currently have a query that gives me the total count:
fetch user.events, scanLimitGBytes:-1 | filter app.bundle == "com.my.package" | filter http.response.status == 200 | summarize count()
This works for totals, but I need:
What’s the correct DQL syntax or recommended approach to achieve this? Should I use makeTimeseries or bin()? And how do I shift last week’s timestamps forward for overlay?
A sample image is attached.
Any examples or best practices would be appreciated!
08 Dec 2025 03:27 AM
@subair-appakkan Here is an example for memory, you can use similar logic for your use case
timeseries today = avg(dt.host.memory.usage),
from:now() - 24h, to:now(),
by: {dt.entity.host},
filter: dt.entity.host== "HOST-XXX"
| fieldsAdd lastWeek = lookup ([timeseries mem = avg(dt.host.memory.usage),
from:now() - 7d - 24h, to:now() - 7d,
by:{dt.entity.host},
filter: dt.entity.host == "HOST-XXX"],
sourceField:dt.entity.host, lookupField:dt.entity.host)[mem]
08 Dec 2025 08:08 AM
I could not make it in the mobile application context.
Featured Posts