Jeroen De Meerleer
3021ec4436
A newline has been added to the metrics.twig template to improve code readability. This change separates different sections of the code, making it easier to understand and maintain.
11 lines
581 B
Twig
11 lines
581 B
Twig
{% for key, metric in config %}
|
|
{% if metric.help is defined and metric.help is not empty %}
|
|
# 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 %}
|
|
|
|
{% endfor %} |