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

DQL for dependency analysis

m_zol
Participant

Hello,

I need a DQL to answer the following questions:

- What is the response time, failure count and throughput of Service B that is called by Service A. The result need to be only for the calls that Service A make to Service B.


I created a DQL that show the services dependency. But could not get the metrics I need.

fetch dt.entity.service
| expand calledby_service=called_by[dt.entity.service]
| expand calls_service=calls[dt.entity.service]
| fieldsAdd service_type = serviceType, clusteredBy = clustered_by[dt.entity.kubernetes_cluster][0], belongsToNamespace = belongs_to[dt.entity.cloud_application_namespace][0], belongsToApp = belongs_to[dt.entity.cloud_application][0],instantiates= instantiates[dt.entity.service_instance][0]  
| lookup [fetch dt.entity.service], sourceField:calledby_service, lookupField:id, fields:{Incoming=entity.name}
| lookup [fetch dt.entity.service], sourceField:calls_service, lookupField:id, fields:{Outgoing=entity.name}
| lookup [fetch dt.entity.kubernetes_cluster], sourceField:clusteredBy, lookupField:id, fields:{Cluster = entity.name}
| lookup [fetch dt.entity.cloud_application_namespace], sourceField:belongsToNamespace, lookupField:id, fields:{Namespace = entity.name}
| fields service_type, service=entity.name, Incoming ,Outgoing, Namespace, Cluster
| summarize count(), by:{service,Incoming,Outgoing}

 

5 REPLIES 5

Unfortunately there is no such metric as far as I know. You can find the relations as you did but can't filter out a certain service metric based on called/caller service.

Agree you cannot do this in the current state. Although we have a preview of Traces on Grail, in which you'd be able to query the traces/spans that are calling Service B from Service A and can calculate your metrics based on that. We can't wait for Traces on Grail to be fully released!

We do have access to Traces on Grail in our QA environment. I'm trying a query to get those data but no success yet.

I also tried on playground but couldn't find a solution yet.

krzysztof_hoja
Dynatrace Champion
Dynatrace Champion

Featured Posts