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

How to export client side response time metric

Jan_Lerche
Visitor

Hello Dynatrace Community

 

we are interested in collecting metrics from the distributed traces via Dynatrace API. Especially, we would like to get the "client side response time". We can see this metric in cascade calls in the Dynatrace UI. If we try to fetch it with the timeseries API this metric is missing. Also for metrics v2 it cannot be found. The built in metric builtin:service.keyRequest.response.client was found in the documentation what should be the correspondence of the metric that could be seen in the UI.

 

The following thread mentrioned this mentric as a topic: https://community.dynatrace.com/t5/Real-User-Monitoring/Client-Side-Response-Time/m-p/176138?_ga=2.2...

Metric export has not been discussed there.

 

Best regards,

Jan Lerche

7 REPLIES 7

michiel_otten
Advisor

Basically there are 2 metrics available builtin:

michiel_otten_0-1680681412222.png

This first is the client side response time per key requests. This means that there is a singular baseline Dynatrace tracks for every key request. This is one advantage of the key request. In the Dyntrace UI you can find this when you filter a chart on a key requests and check the response time. 

The second one is a generic response time per web service, so basically all the requests combined together.
Both metrics can be exported via an API script and used in custom reporting. I can find the metric via the API using (v2).

 

Hi Jan,

If you would like find more information about metrics please click the link below:

https://www.dynatrace.com/support/help/observe-and-explore/metrics/built-in-metrics

In this part of our documentation you can find all available metrics and their describes. In you case if you looking for data from client side response time you should to use this metric: builtin:service.response.client

Screenshot 2023-04-05 at 10.03.44.png

 

 

You can download these metrics using our API v2.

This metric (builtin:service.keyRequest.response.client) only applies to requests marked as key.

Regards,

Radek

 

Have a nice day!

Hello

if we try to get values for this metric for steps, that show client side response time in the UI, we get no result from the API. Did someone test the API for this metric successfully? Which conditions have to be fulfilled to get values for certain user action steps?

Hi,

It's work for me. Below you can find my curl:

curl -X 'GET' \  'https://<id>/api/v2/metrics/query?metricSelector=builtin%3Aservice.response.client' \  -H 'accept: application/json; charset=utf-8' \  -H 'Authorization: Api-Token <token>'

and response body:

Screenshot 2023-04-06 at 09.48.25.png

 You can through to the URL https://<your tenant>rest-api-doc and from DT's GUI help test the use of the API. Remember the proper token scope: metrics.read.

Radek

 

Have a nice day!

Hi,

I can confirm that I also get results similar as mentioned above.
Could you please check out what the response from the API is? Do we get a certain error?
Are other API calls resulting in a 'good' result? \

KR.
Michiel

I also checked the api querying directly from Postman and everything works fine for me:) 

Have a nice day!

Now it works fine for me. Thank you!