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

Filtering by request attribute values in Data Explorer

swin12
Participant

Question:

Using data explorer, I currently have dashboard tiles that show the average processing time of a service and its key requests. Can I filter these tiles further using a particular value of a request attribute?

For example:
The possible values for the request attribute 'flow' are 'foo' and 'bar'. Can I use data explorer to show me response/processing time data for only the requests that:

A) Have the request attribute 'flow'.
B) Have the value of 'bar'.

 

Background:

I have a service that serves several requests. I have marked the requests I'm interested in as key requests. I have configured a request attribute for the key request that indicates which one of our (many) business flows generated the request.

Currently, I have added a tile to my dashboard that shows the total processing time of the key request(s) as an average. However, I'd like to split this tile by an extra dimension of 'flow' (the name of my request attribute). The request attribute doesn't seem to be an option in data explorer when I configure the split:

 

swin12_0-1654530448192.png

 

If I try to split the data at the service level, there does seem to be a filter available for the request attribute, but this doesn't seem to support the value of the attribute. It only seems to refine the query by which requests contain that particular attribute key:

 

swin12_1-1654530757732.png

 

I can seem to get the result I'm looking for using multidimensional analysis, however:

 

swin12_2-1654530844944.png

Thanks!

9 REPLIES 9

mgome
Advisor

Request attributes are not part of the metric dimensions out of the box. You can create a calculated service metric for the request and add the request attribute in the "Split by dimension" section of the calculated service metric.

techean
Dynatrace Champion
Dynatrace Champion

Create calculated metrics | Dynatrace Docs use it as suggested by @mgome , as you said split by service result in data explorer is not bringing you the expected value you can go ahead with calculated metrics

KG

Thanks @mgome and @techean. This seems to make sense... Some follow up questions/comments, if you don't mind:

 

Before I create the calculated service metric, I suppose I could configure the MDA view in one of two ways:

 

  1. Showing results for all values for the 'flow' attribute:swin12_3-1654625758776.png

     

  2. Filtered by a specific value for 'flow' (i.e. 'foo'):swin12_2-1654625681865.png

Does the presence of a filter (such as filtering on a specific 'flow' value) in my MDA query/view have an effect on the the calculated service metric that I create? I suppose for my use case, I would not want to apply a filter for a specific value. Idea being that the calculated service metric can be split by dimension in Data Explorer? Something like:

 

swin12_4-1654625954483.png

Unfortunately at the time of writing this, I don't have any data to work with... or else I'd test this on my own. Would this data explorer query allow me to filter on specific values for the 'flow' attribute?

 

 

techean
Dynatrace Champion
Dynatrace Champion

the presence of filter will not have any additional effect on your calculated metric. Ideally data explorer will allow you to filter specific value based on your request attribute.

KG

Now that I have some data coming in, I can confirm that using the calculated service metric in Data Explorer, I can filter by the value of the request attribute using the 'Dimension' filter. Thanks!:

 

swin12_0-1654719375484.png

 

Unfortunately, this is not a solution. Calculated metrics require DDU's. The data is already in Dynatrace, why should we pay twice just to get it visualized properly?

Also (after looking into this in more detail) this doesn't always apply. What about requests that are not within scope of an application?

dannemca
DynaMight Guru
DynaMight Guru

The great idea here is to make the request attribute as default dimensions automatically on the builtin service metrics. That will help a lot.

I have some calc metrics created to do these queries, but the work get confusing when you have needs to cross filter these attributes, since you can choose only one dimension for these calc metrics.

I will mark this thread to see if you or someone else got luck with this task.

Site Reliability Engineer @ Kyndryl

clemens_hoffman
Visitor

Hello,

I stumbled over the same issue. I want to filter requests based on the request path in a dashboard. So I created a Request Attribute for the request path, and excluded /health requests (I do not want to chart them). 
The request attribute works fine: It is added for /api/* requests, but not for /health requests.

However, the Request Attribute filter in Data Explorer is totaly useless, it does not even filter out those requests which do not have the Request Attribute. Moreover, I cannot create a calculated service metric, because the request Attribute selector is empty.

Screenshot 2023-04-13 at 13.06.32.pngScreenshot 2023-04-13 at 13.06.52.png

Can someone help or explain why it's not working as expected?

Best regards

Clemens

You are not defining the calculated metric correctly.

  • First you need to defined the base metric - such as response time or request count.
    Julius_Loman_1-1681759995399.png

     

  • Then define the conditions which are treated as filter (to narrow down requests counting toward the calculated metric)
  • Finally you need to use the request attribute as the split by dimension:Julius_Loman_0-1681759937522.png
Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts