diff --git a/templates/metrics.twig b/templates/metrics.twig index 60d7eb7..07b156d 100644 --- a/templates/metrics.twig +++ b/templates/metrics.twig @@ -3,6 +3,7 @@ # HELP {{ key }} {{ metric.help }} {% endif %} # TYPE {{ key }} {% if metric.type is defined and metric.type is not empty %}{{ metric.help }}{% else %}gauge{% endif %} + {% for subkey, submetric in metric.submetrics %} {{ key }}{% if submetric.labels is defined and submetric.labels is not empty %}{{ '{' }}{% for label, value in submetric.labels %}{{ label }}="{{ value }}"{% if not loop.last %},{% endif %}{% endfor %}{{ '}' }}{% endif %} {{ submetric.value }} {% endfor %}