# Prometheus metrics topology

**URL:** <https://community.dynatrace.com/t/prometheus-metrics-topology/44509>\
**Category:** Extensions\
**Tags:** dynatrace-managed, prometheus, topology, extensions\
**Created:** [March 7, 2024, 8:40pm UTC](https://community.dynatrace.com/t/prometheus-metrics-topology/44509 "2024-03-07T20:40:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jennifer](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@Jennifer](https://community.dynatrace.com/u/Jennifer)\
**Post date:** [March 7, 2024, 8:40pm UTC](https://community.dynatrace.com/t/prometheus-metrics-topology/44509/1 "2024-03-07T20:40:29Z")

</div>

I have created a custom extension using the Dynatrace Extensions VSCode app.&nbsp; Everything is working as expected, when I scrape my metrics it is able to find all metrics and generate keys and values.&nbsp; The issue I am having is that we have our metrics grouped by workflow types and status and I am unsure of how to build the topology into my yaml.&nbsp; Is there documentation on how the topology is configured?

Sample metrics:

```auto
# HELP scaler_deployed_workflows_total Monitoring Scaler's health by tracking malfunctioning workflows.
# TYPE scaler_deployed_workflows_total gauge
scaler_deployed_workflows_total{status="active",group="on_demand",} 0.0
scaler_deployed_workflows_total{status="inactive",group="on_demand",} 0.0
scaler_deployed_workflows_total{status="inactive",group="batch",} 0.0
scaler_deployed_workflows_total{status="active",group="batch",} 28.0
scaler_deployed_workflows_total{status="active",group="system",} 8.0
scaler_deployed_workflows_total{status="inactive",group="system",} 0.0

```

How can I add the additional “groupings” for each metric?&nbsp; When the ext is running in my environment it seems to only gather the first metric.

Sample yaml:

prometheus:&nbsp; - group: metrics&nbsp; &nbsp; metrics: &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; - key: scaler\_deployed\_workflows\_total&nbsp; &nbsp; &nbsp; &nbsp; value: metric:scaler\_deployed\_workflows\_total&nbsp; &nbsp; &nbsp; &nbsp; type: gauge

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [March 8, 2024, 2:21pm UTC](https://community.dynatrace.com/t/prometheus-metrics-topology/44509/2 "2024-03-08T14:21:22Z")

</div>

Hi,

You can add that as dimensions, for example:

```markup
prometheus:
  - group: metrics
    metrics:      
      - key: scaler_deployed_workflows_total
        value: metric:scaler_deployed_workflows_total
        type: gauge
    dimensions:
      - key: status
        value: label:status
      - key: group
        value: label:group

```
