For a couple of time I have the need of a special metric.
Let's say there is a header value for each of my clients. Every time a client sends a request to the API, they have a unique key. I have applied my request attribute for this scenerio and merged this request attribute with a certain rule like Rate Limit.
Now I want to calculate how many unique value hit my rule in a certain timeframe. Currently I can only calculate how many times an ID hit the rule or how many times that rule worked in total. I want to calculate each unique value occurence as 1, no matter how many request they have sent in a 1 minute resolution (or whatever my resolution is)
For example some requests in a minute:
Request 1 => Header: MyHeaderValue, Value: A
Request 2 => Header: MyHeaderValue, Value: B
Request 3 => Header: MyHeaderValue, Value: C
Request 4 => Header: MyHeaderValue, Value: B
Request 5 => Header: MyHeaderValue, Value: B
Request 6 => Header: MyHeaderValue, Value: D
As you can see, there are 6 requests to my API. Each have a header key as "MyHeaderValue". But each have a unique value. What I see on Dynatrace are like this
1=> There are 6 requests with MyHeaderValue key or
2=> There are 6 requests, splitting by dimension 1 request from A, 1 request from C, 1 request from D, 3 requests from B
What I want is to show me, => 4 unique values for MyHeaderValue request attribute.
Is there a way to achieve this kind of calculation in data explorer or by metrics api?
you can do this by using the request attribute itself as a dimension and use merge service instead ofsplit by service as shown in the below figures you'll get the desired result
if you spanning specific service you can filter by it.
in this case you have to create custom metric, accordingly you can make a tile on dashboard using this custom metric and pick the top 10, 20 as you like to get a hotspot on the top trending request attribute values.
No, that is not my issue. The issue is there are hundreds maybe thousands of unique value in each minute. Some maybe occur 4 times, 5 times in a minute. I want to eliminate those reoccurs and only calculate the number of unique values in a minute. Let's say there are 6K values in 09:00 but only 2K unique values. I don't want any top 10-20 etc.. I have created a custom metric but I am not able to see unique values in a time frame.
as we know the multidimensional analysis is exactly designed for aggregation results so we can leverage it, take a deep look on the 1st screenshot i've sent, you'll see that the result is a unique values not single values you can try it yourself in the desired environment.
regarding the timeframe within the tile settings you can set it and have the variety for filtration.
This is one of our best times. I need something to count Booking=* unique values and show them as it is on the graph. Finding out "Booking=findJourneys" has 100 requests on 09:49 on the graph is not helpful at all. I need to know how many Booking=* unique values in each minute and draw the graph with number of unique values in each minute.