# How to filter Requests to public networks by the calling service

**URL:** <https://community.dynatrace.com/t/how-to-filter-requests-to-public-networks-by-the-calling-service/53154>\
**Category:** DQL\
**Tags:** dql, dynatrace-managed\
**Created:** [August 28, 2025, 11:24pm UTC](https://community.dynatrace.com/t/how-to-filter-requests-to-public-networks-by-the-calling-service/53154 "2025-08-28T23:24:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![smitty](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@smitty](https://community.dynatrace.com/u/smitty)\
**Post date:** [August 28, 2025, 11:24pm UTC](https://community.dynatrace.com/t/how-to-filter-requests-to-public-networks-by-the-calling-service/53154/1 "2025-08-28T23:24:20Z")

</div>

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.&nbsp; I can create a custom metric from this as well and it works in DQL with no issues.&nbsp; &nbsp;Problem is I can’t filter this by the calling service and multiple services call the same public network.&nbsp; How can I filter the calls to a public network by the calling service?

---

<div class="post-metadata">

**Author:** ![mizso74](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mizso74/32/41729_2.png) [@mizso74](https://community.dynatrace.com/u/mizso74)\
**Post date:** [August 30, 2025, 9:26am UTC](https://community.dynatrace.com/t/how-to-filter-requests-to-public-networks-by-the-calling-service/53154/2 "2025-08-30T09:26:37Z")

</div>

Hi&nbsp;[@smitty](https://community.dynatrace.com/user/94962)

I am new in DQL.

Play this one, it is not correct. This list contains those services which ones initiated a call to&nbsp;Requests to public networks. But the list not filtered, so it includes the initiatior service all handled calls not only the relevant calls to&nbsp; 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:

 ![Mizs_0-1756545142976.png](https://global.discourse-cdn.com/dynatrace/original/2X/1/1a63b724b18d4203f9776b5fa503865798940fc5.png)

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}

 ![Mizs_1-1756545940489.png](https://global.discourse-cdn.com/dynatrace/original/3X/3/3/33a90c8901adeebb377bcc109e885a01be96d88b.png)

I hope you or other community members can modify it and you can use it for your purposes.

Best regards,

János

---

<div class="post-metadata">

**Author:** ![smitty](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@smitty](https://community.dynatrace.com/u/smitty)\
**Post date:** [September 10, 2025, 2:35pm UTC](https://community.dynatrace.com/t/how-to-filter-requests-to-public-networks-by-the-calling-service/53154/3 "2025-09-10T14:35:13Z")

</div>

Thanks for the DQL example.&nbsp; I’m new to DQL as well and hindered by the fact we don’t have the Platform Subscription license so I’m very limited in what I can do with DQL without it.&nbsp; For example I can’t use spans.  
So, for now I’m using a work around and creating a custom metric for every environment and add rules in the Metric to do the filtering by environment and server.
