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

Getting data for a key request called by a service

erh_inetum
Advisor

Hi,

I'm trying to getting the response time of a key request called by a service.

To get it I'm launching this query in Data Explorer:

erh_inetum_0-1712643336254.png

The aggregation used is average.

But the result is different is I get this data from MDA:

erh_inetum_1-1712643513382.png

Furthemore, in Data Explorer when I'm trying to get the same metric but for another "called by" service, I get the same result when it shouldn´t. And I've checked in the MDA and in the resquest that the response time is different.

 

Is it possible to get this using Data Explorer? Don´t it should the same result from Data Explorer and MDA?

 

Thanks in advance.

Regards,

Elena.

 

 

6 REPLIES 6

Hi @erh_inetum ,

 

There are few errors in here.

 

First if You want to have splitting by request (that MUST be a key request) You need to use different metric in DataExplorer: builtin:service.keyRequest.response.server

Using Your original metric will always ends up in service requests count for service that matches Your selector. Not requests within it.

 

obviously Your query need to change as well to properly reflect that:

builtin:service.keyRequest.response.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"REQUESTNAME~")"))),or(in("dt.entity.service_method",entitySelector("type(service_method),fromRelationship.isServiceMethodOfService(type(SERVICE),HERE GOES YOUR RELATIONSHIP)"))))):splitBy("dt.entity.service_method"):sort(value(auto,descending))


If it happens that it won't be good enough (MDA has better filtering options) You might want to create calculated metric from MDA for that.

Bests
Michal

erh_inetum
Advisor

Hi @MichalOlszewski ,

Thanks for your help.

I've modified the query according your comments and it doesn´t return results:

 

builtin:service.keyRequest.response.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"KEY_WEB_REQUEST~")"))),or(in("dt.entity.service_method",entitySelector("type(service_method),fromRelationship.isServiceMethodOfService(type(SERVICE),entityName.contains(~"CALLED BY THE SERVICE~"))")))))

 

but the MDA does.

Thanks a lot for your help. I carry on researching on this way.

 

About creating a calculated metric from MDA it's not possible due to hierarchy filter:

erh_inetum_0-1712655166619.png

 

There are two product idea created related to this:

https://community.dynatrace.com/t5/Product-ideas/Create-Metric-from-MDA/idi-p/187983

https://community.dynatrace.com/t5/Product-ideas/Creating-a-metric-from-MDA-supporting-filter-quot-c...

One of these is under review.

 

Thanks,

Elena.

Hi @erh_inetum 

have You created Key Request for Your request on this service?
Having Key request, this alone should work:

builtin:service.keyRequest.response.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"REQUEST~")"))))):splitBy():sort(value(auto,descending)):limit(20)

As You will be showing specific request.
Please take into account that KeyRequest data starts collecting at the moment of creation KeyRequest (no backward/historic data). You need to define them on service level.

Bests
Michal

Hi Michal,

 

Yes, the request is marked as key web request.

Based on the initial query you sent, adding the part in bold the query returns data:

 

builtin:service.keyRequest.response.server:filter(and(or(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"keyrequest~")"))),or(in("dt.entity.service_method",entitySelector("type(service_method),fromRelationship.isServiceMethodOfService(type(SERVICE),entityName.equals(~"keyrequest's service~"),fromRelationship.CALLS(type(~"SERVICE~"),entityName.equals(~"the called by service~")))")))))

 

But I create this query twice, one for a called by service and the other one for other called by service and the results returned are the same:

erh_inetum_1-1712664004516.png

It's strange.

We need to get the same that

erh_inetum_0-1712663577931.png

in Data Explorer to pin to dashboard as it is not possible to create a metric due to the hierarchy.

 

Thanks a lot again, Michal.

Regards,

Elena.

Hi @erh_inetum 

IF Your KeyRequest is being called from 2 different Services (or calls 2 different services depending on whatever)
You cannot distinguish them like that using DataExplorer. This filter only applies rule that Request needs to be within Service with specified filter which in Your cease is exactly the same service.

It doesn't split requests itself into 2 buckets. 

But You have few options:

  • You can calculate 'client side' requests and use metric of "client side" type (least invasive - require source service to be monitored) for mentioned Request
  • You can use Grail DQL - require SaaS and grail - for such query
  • You can split request into 2 by creating RequestNamingRules (very invasive into config - usually not recommended)

Hope this helps

Bests
Michal

 

Hi Michal,

Using "client side" metric doesn´t return data in our case.

They aren´t using Grail.

And spliting request I think maybe it's not going to work because the situation is the same: same request belongs to the same service called by two different services.

Thank you very much anyway for your help.

Regards,

Elena.

Featured Posts