Skip to content

Commit

Permalink
generate semconv for 1.23.1 (open-telemetry#1145)
Browse files Browse the repository at this point in the history
a bug in 1.23.0 meant that cloud, container and oci resource attributes were incorrectly published under trace attributes.
sort the attributes, so that future diffs are easier to read.
  • Loading branch information
brettmc authored Nov 21, 2023
1 parent d6c4c89 commit 28657a9
Show file tree
Hide file tree
Showing 5 changed files with 1,175 additions and 1,306 deletions.
2 changes: 1 addition & 1 deletion script/semantic-conventions/semconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPEC_DIR="${ROOT_DIR}/var/semantic-conventions"
CODE_DIR="${ROOT_DIR}/src/SemConv"

# freeze the spec & generator tools versions to make SemanticAttributes generation reproducible
SEMCONV_VERSION=${SEMCONV_VERSION:=1.23.0}
SEMCONV_VERSION=${SEMCONV_VERSION:=1.23.1}
SPEC_VERSION=v$SEMCONV_VERSION
SCHEMA_URL=https://opentelemetry.io/schemas/$SEMCONV_VERSION
GENERATOR_VERSION=0.23.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface {{ class }}AttributeValues
*/
public const SCHEMA_URL = '{{schemaUrl}}';

{%- for attribute in attributes | unique(attribute="fqn") %}
{%- for attribute in attributes | unique(attribute="fqn") | sort(attribute="fqn") %}
{%- if attribute.attr_type.members %}
{%- for member in attribute.attr_type.members %}
{%- if member.brief %}
Expand Down
2 changes: 1 addition & 1 deletion script/semantic-conventions/templates/Attributes.php.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface {{ class }}Attributes
* The URL of the OpenTelemetry schema for these keys and values.
*/
public const SCHEMA_URL = '{{schemaUrl}}';
{% for attribute in attributes | unique(attribute="fqn") %}
{% for attribute in attributes | unique(attribute="fqn") | sort(attribute="fqn") %}
/**
* {{ attribute.brief | render_markdown(code="`{0}`", paragraph="{0}", link="{1}") | to_doc_brief | regex_replace(pattern="\n", replace="\n * ") }}.
{%- if attribute.note %}
Expand Down
Loading

0 comments on commit 28657a9

Please sign in to comment.