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

21 lines
712 B
Django/Jinja

{#- Macros for simplifying creating "Event" documentation. -#}
{% import 'stability.j2' as stability %}
{% import 'body_field_table.j2' as body_table %}
{% macro header(event) %}**Status:** {{ stability.badge(event.stability, event.deprecated) }}
The event name MUST be `{{ event.name }}`.
{{ event.brief | trim }}
{%if event.note %}
{{ event.note | trim }}
{% endif %}
{% endmacro %}
{% macro body(body) %}{% if body %}**Body fields:**
:warning: Body fields will be moved to complex attributes once the
semantic convention tooling supports complex attributes
(see [#1870](https://github.com/open-telemetry/semantic-conventions/issues/1870)).
{{ body_table.generate(body.fields) }}
{% endif %}{% endmacro %}