24 Dec 2025 12:22 PM
Hello.
I am struggling to create a REQUEST COUNT metric for the Services targeting, all Services that run on specific hosts (filter by hostname, eg. contains("something")).
BR
24 Dec 2025 02:09 PM
Hi theodore,
Would this work for you? You use the Data explorer to look at the fromRelationships from that specific service.
builtin:service.request.count:splitBy("dt.entity.service"):filter(in("dt.entity.service", entitySelector("type(~"SERVICE~"),fromRelationship.runsOnHost(type(~"HOST~"),entityName.contains(~"YOURHOST~"))")))
KR.
Michiel
24 Dec 2025 02:54 PM
Hello @michiel_otten.
I tried it but no results are returned. Something missing maybe(?).
24 Dec 2025 03:04 PM - edited 24 Dec 2025 03:07 PM
Yes, by me! 😉
I've succesfully exectuted this one on the playground
builtin:service.requestCount.total:splitBy("dt.entity.service"):filter(in("dt.entity.service", entitySelector("type(~"SERVICE~"),fromRelationship.runsOnHost(type(~"HOST~"),entityName.contains(~"lnx1-demo.c.dynatrace-demoability.internal~"))")))I mentioned the wrong metric.
26 Dec 2025 12:04 AM
It is working indeed, by I think that shows the services running on the host. Quite useful, but not the case here. We want the services that send requests to the services running on the host.
BR
29 Dec 2025 10:41 AM - edited 29 Dec 2025 10:41 AM
Hi there,
I haven't double checked this but in theory you should be able to use relationships for this:
builtin:service.requestCount.total:splitby("dt.entity.service"):filter(in("dt.entity.service", entitySelector("type(~"SERVICE~"),toRelationship.CALLS(type(~"SERVICE~"),fromRelationship.runsOnHost(type(~"HOST~"),entityName.contains(~"YOUR_HOST_HERE~")))")))
30 Dec 2025 10:38 PM
Solution by @michiel_otten will work, just keep in mind those are metrics for all the services, so it's not count of the requests of service A calling service B, but total requests of service A where some of the requests (maybe only one in last two hours) called service B.
If you need to count only requests from service A calling service B, you need to use Multidimensional analysis / Service flow / Service backtrace or query spans (if you use Dynatrace SaaS with Traces in Grail).
I recommend tagging the services (using similar selector) and then using just these tags in Data Explorer.
30 Dec 2025 11:55 PM
Hi @Julius_Loman. Very interesting comment:
keep in mind those are metrics for all the services, so it's not count of the requests of service A calling service B, but total requests of service A where some of the requests (maybe only one in last two hours) called service B.
This had totally skipped my mind! If that is the case then I do not see how tagging would help. It will sjow again the service metrics for all calls not only from Service A to Service B.
BR
31 Dec 2025 08:18 AM
@Theodore_x86 tagging does not help to overcome this, it just makes data explorer usage a little easier.
So if you want just count of the requests of service A calling service B, it's not possible to do that with data explorer. Use MDA / service flow to get the numbers (not possible to have that on a dashboard) or DQL on spans if you use SaaS with Grail.
Featured Posts