{#- Macros for simplifying creating "Span" documentation. -#}
{% import 'stability.j2' as stability %}
{% macro header(span) -%}
**Status:** {{ stability.badge(span.stability, span.deprecated) }}

{{ span.brief | trim }}
{%- if span.note %}

{{ span.note | trim }}{% endif %}
{%- if "**Span kind" not in span.note %}

**Span kind** SHOULD be `{{ span.span_kind | upper }}`.{% endif %}
{%- if "**Span status" not in span.note %}

**Span status** SHOULD follow the [Recording Errors](/docs/general/recording-errors.md) document.{% endif %}

{%- if span.entity_associations is sequence %}

**Entity Associations** SHOULD be associated with one of the following entities:

{% for e in span.entity_associations %}
- `{{ e }}`
{% endfor %}
{% endif %}

{% endmacro %}
