29 Aug 2025
12:24 AM
- last edited on
29 Aug 2025
07:37 AM
by
MaciejNeumann
Using the Custom multidimensional analysis for Requests to public networks and filtering by a Request/Endpoint I'm able to view all the outbound requests from our environment. I can create a custom metric from this as well and it works in DQL with no issues. Problem is I can't filter this by the calling service and multiple services call the same public network. How can I filter the calls to a public network by the calling service?
30 Aug 2025 10:26 AM
Hi @smitty
I am new in DQL.
Play this one, it is not correct. This list contains those services which ones initiated a call to Requests to public networks. But the list not filtered, so it includes the initiatior service all handled calls not only the relevant calls to Requests to public networks.
fetch spans, from: -1d, to: now()
| filter isNotNull(endpoint.name)
| lookup [fetch dt.entity.service], sourceField: dt.entity.service, lookupField: id, fields: { caller.name = entity.name}
| lookup [fetch dt.entity.service | expand caller.id = called_by[dt.entity.service]], sourceField: dt.entity.service, lookupField: caller.id, fields: { called.name = entity.name}
| filter called.name == "Requests to public networks"
| summarize { count=count()}, by: {caller.name, called.name}
I have received this result:
I have created the opposit way also, but this does not work for Request to public networks (becaues its opaque service):
fetch spans, from: -1d, to: now()
| filter isNotNull(endpoint.name)
| lookup [fetch dt.entity.service], sourceField: dt.entity.service, lookupField: id, fields: { called.name = entity.name, id}
| lookup [fetch dt.entity.service | expand caller.id = calls[dt.entity.service]], sourceField: dt.entity.service, lookupField: caller.id, fields: { caller.name = entity.name}
| filter caller.name == "your not opaque service name"
| summarize { count=count()}, by: {caller.name, called.name, id}
I hope you or other community members can modify it and you can use it for your purposes.
Best regards,
János