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

How to fetch response times of all the calls made through a Service

Yashmeet
Visitor

Hi,

I understand that we can fetch the average response time of services, for example, via the following TimeseriesAPI.

https://{your-environment-id}.live.dynatrace.com/api/v1/timeseries/com.dynatrace.builtin:service.
responsetime? apitoken=XXXXXXXXX&includeData=true&relativeTime=hour&aggregationType=avg&entity=
SERVICE-XXXXXXXXX

This returns the average of response time of a specific Service named as "SERVICE-XXXXXXXXX".

 

I have a service which calls another service. Both of these service makes series of db, authentication and other calls. Is there a way to get response time of a particular request made to SERVICE-XXXXXXXXX and also the individual response times of different calls that SERVICE-XXXXXXXXX made as part of the request.

3 REPLIES 3

mark_bley
Dynatrace Advisor
Dynatrace Advisor

Hi @Yashmeet

maybe following query is what you are looking for, it reports the response time for individual keyRequests

builtin:service.keyRequest.response.client:filter(and(in("dt.entity.service_method",entitySelector("type(service_method),entityName.equals(~"/Booking~")")))):splitBy("dt.entity.service_method"):avg:auto:sort(value(avg,descending)):limit(10)

You would need to define the request as keyRequest beforehand

mark_bley_0-1662734262501.png

 

Yashmeet
Visitor

Hi @mark_bley Thanks for your prompt reply. For my use case, i need purepath information in JSON format. Like for example, for below image i need a JSON having list of response times of all the underlying calls.PurePath.png

I see, unfortunately atm there is no way to extract PurePath data from the API.

You could check if creating a metric for the specific response times for that PostgreDB has the necessary info you are looking for. 

mark_bley_0-1662967345687.png