opentelemetry-php/script/semantic-conventions/templates/registry/php/Attributes.php.j2

34 lines
1.0 KiB
Django/Jinja

{% import 'common.j2' as c %}
<?php
// DO NOT EDIT, this is an Auto-generated file from script/semantic-conventions
declare(strict_types=1);
namespace OpenTelemetry\SemConv;
interface TraceAttributes
{
/**
* The URL of the OpenTelemetry schema for these keys and values.
*/
public const SCHEMA_URL = '{% include "version.txt" without context %}';
{% for section in ctx %}
{#{ debug(section) }#}
{% for attribute in section.attributes %}
{% if attribute.name not in section.excluded_attributes %}
{%- if attribute is deprecated %}
{%- set deprecated_phpdoc = "@deprecated " ~ attribute.deprecated -%}
{% else %}
{% set deprecated_phpdoc = "" %}
{%- endif -%}
{{ [attribute.brief, concat_if(attribute.note), deprecated_phpdoc] | comment(indent=4) | replace(' \n', '\n') }}
public const {{ c.attribute_name(attribute) }} = '{{ attribute.name }}';
{% endif %}
{% endfor %}
{% endfor %}
}
{# blank line #}