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

Get metrics for key requests using tags

bwburch1
Visitor

 

I'm wanting to pull metrics from dynatrace for keyRequest using a tag value instead of the SERVICE_METHOD ID.  

 

Here's my example:

 

/api/v2/metrics/query/?entitySelector=type(SERVICE_METHOD),

entityId(SERVICE_METHOD-123456)&

metricSelector=builtin:service.keyRequest.response.time:merge(0):percentile(90)&

from=1632101783000&

resolution=Inf&

to=1632106514000

 

How would I replace the SERVICE_METHOD ID using a tag value?

3 REPLIES 3

Hello,

It is something I would like to get too. I tried using the "tag" filed:

entitySelector("type(service_method),tag(~"WCSCMS - CMS~")")

 

The parameter is accepted but it is not working. I don't understand if DT will allow to perform this query in the future (like the old Metric API allowed you to do) or if they decided to totally remove this feature.

 

For the moment, if it helps you can filter by Keyrequest name:

entitySelector("type(service_method),entityName(~"KEYREQUESTNAME~")")

Your recommendation works great!  Now that I can see metrics for keyRequest is it possible to use a filter on parent service to get keyRequest metrics? The reason I ask is if there are duplicate keyRequest names in dynatrace for two different services.

 

Example: give me the keyrequest with name "createOrder" from my parent service that is called "order-service". 

 

 

They use case you are describing is exactly the reason why filtering by tag make a lot of sense. Unfortunately  it seems they decided to remove it...the only workaround is to change the name of the keyrequest sharing the same name I suppose

Featured Posts