29 Aug 2023 08:43 AM
Hi Team,
Currently we have lot of services(consider A,B,C) calling a particular services(X) we want to know the request count made by each services(A to X like wise B to X so..on) to be displayed on dashboard.
Can we use below option on metrics somehow?
Thanks,
Nathaniel J
Solved! Go to Solution.
29 Aug 2023 09:05 AM
Hi @jnernest
In a utopian world you just need to click create metric 🤗
How ever sadly, this is currently not available 🤔
HTH
Yos
04 Aug 2025 07:04 AM
Thanks for the input @Yosi_Neuman
Yeah there is an option but when we are trying to filter the service like called service and called by service. The metric is not getting created and shows the error you attached in your reply.
Is there any other way to solve this usecase, I tried using Calculated Service Metric but I didn't find any option to select the called service and called by service.
04 Aug 2025 10:19 AM - edited 04 Aug 2025 11:02 AM
This can be acheived by using relationships in Data Explorer. Thanks to @Mohamed_Hamdy for helping.
builtin:service.requestCount.total
:filter(in("dt.entity.service",
entitySelector(
"type(SERVICE),entityName.equals(\"<CALLED-SERVICE>\"),toRelationship.CALLS(type(SERVICE),entityName.equals(\"<CALLING-SERVICE>\"))"
)
))
04 Aug 2025 12:24 PM
@zaid-bashir no, this is not answer to the question. In your case it will output total request count for services which are called from specific services and not just those requests originating from the service you have in the filter.
In SaaS this can be achieved with traces in grail functionality (e.g. fetch spans - with proper filtering)
In Managed, you are mostly out of luck of having that on a dashboard, but sometimes it is possible to identify the originating service by some request attribute (e.g. specific http header for example). In that case it's possible to use calculated service metrics.