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

Collecting all metrics from an endpoint with custom prometheus extension

KVL
Frequent Guest

I have created a custom Prometheus extension that collects metrics from an endpoint.

The thing is, there's over 100 metrics there and I don't want to add every one of them manually to the json.

So my question is, is there a way to collect all metrics from an endpoint? Or at least all metrics starting with a specific prefix (most of them have the same prefix)?

I saw in this documentation https://docs.dynatrace.com/docs/shortlink/prometheus-extensions-reference#filters that you can use "filter", however it seems to be in a different section of the json, and not where the metrics are, and seems metrics still need to be added regardless, if I'm understanding correctly.

1 REPLY 1

Julius_Loman
DynaMight Legend
DynaMight Legend

 Extensions 2.0 must have metrics defined explicitly. Use the VS Code extension where you have development assistance which allows you to add the metrics automatically:

Julius_Loman_0-1725959645106.png

Please follow the lightbulb icon for assistance.


Otherwise scraping all metrics by a filter is only available in k8s environments where the Dynatrace Operator can scrape metrics from Prometheus exporters in your application pods. 

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts