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

DQL Query to return data point count for metrics matching a certain naming convention

36Krazyfists
Helper

So, I'm sure I can put together a query that returns the data point count for any single metric, but I have a bunch of Open Telemetry metrics we are pushing into our Dynatrace SaaS instance and, since those are billable, I'd like to get an estimate of their cost impact for our DPS licensing.

 

If it was just number of metrics times 1 minute resolution then, easy-peasy, but since most of these metrics have multiple dimensions and that can cause multiple data points per metric, it's hard to get a clear count for all of these specific metrics coming in.

 

Meaning, what I'd like is a query that pulls total data points (including all dimensions) for all metrics with "idm_" in their name.


Do any of you DQL wizards out there know if that's possible?

1 REPLY 1

NeJoyer
Contributor

I had a similar problem. I wasn't able to find a way to do it with DQL, but how I ended up solving my problem:
On DPS, there is a metric "(DPS) Recorded metric data points per metric key".

So then I was able to use the Data explorer to create a chart:
builtin:billing.custom_metrics_classic.raw.usage_by_metric_key:filter(and(or(not(contains(metric_key,"builtin"))))):splitBy(metric_key):sort(value(auto,descending)):limit(10)

For me, this gave me how many data points there were for each of the non-builtin metrics. You can adapt the query to look for your specific prefix.
This was useful for checking that no one had configured any metrics that were more expensive than the value they provided.

Featured Posts