semantic-conventions/templates/registry/markdown/metric_table.j2

9 lines
793 B
Django/Jinja

{% import 'stability.j2' as stability %}
{% import 'notes.j2' as notes %}
{% import 'metric_macros.j2' as metrics %}
{% macro print_entities(associations) %}{%- for e in associations %}{%if loop.first == false %}; {% endif %}`{{ e | trim }}`{%- endfor %}{% endmacro %}
{% macro generate(group) %}| Name | Instrument Type | Unit (UCUM) | Description | Stability | Entity Associations |
| -------- | --------------- | ----------- | -------------- | --------- | ------ |
| `{{ group.metric_name }}` | {{ metrics.instrument(group.instrument) | trim }} | `{{ group.unit }}` | {{ group.brief | trim }}{{ notes.add({"note": group.note}) }} | {{ stability.badge(group.stability, group.deprecated) | trim }} | {{ print_entities(group.entity_associations) }} |
{{ notes.render() }}{% endmacro %}