10 Sep 2024 08:48 AM
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.
Solved! Go to Solution.
10 Sep 2024 10:17 AM
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:
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.