cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to filter Requests to public networks by the calling service

smitty
Newcomer_

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?

1 REPLY 1

Mizső
DynaMight Guru
DynaMight Guru

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:

Mizs_0-1756545142976.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

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

Best regards,

János

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

Featured Posts