Skip to content

Commit

Permalink
Update semantic-conventions version to v1.30.0 (#6077)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrice Chalin
  • Loading branch information
opentelemetrybot authored Jan 24, 2025
1 parent f37118d commit 149cb6f
Show file tree
Hide file tree
Showing 6 changed files with 358 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
[submodule "content-modules/semantic-conventions"]
path = content-modules/semantic-conventions
url = https://github.com/open-telemetry/semantic-conventions
semconv-pin = v1.29.0
semconv-pin = v1.30.0
[submodule "content-modules/opamp-spec"]
path = content-modules/opamp-spec
url = https://github.com/open-telemetry/opamp-spec
Expand Down
2 changes: 1 addition & 1 deletion content-modules/semantic-conventions
6 changes: 3 additions & 3 deletions content/en/blog/2024/prometheus-compatibility-survey/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ of their opinions on units or delimiters.

## Dots and Underscores

OpenTelemetry [specifies](/docs/specs/semconv/general/attribute-naming/) that
conventions should use dots as the namespace delimiter, and underscores as the
delimiter between "multi-word-dot-delimited components" (for example,
OpenTelemetry [specifies](/docs/specs/semconv/general/naming/) that conventions
should use dots as the namespace delimiter, and underscores as the delimiter
between "multi-word-dot-delimited components" (for example,
`http.response.status_code`). On the other hand, Prometheus
[uses underscores](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels)
as its delimiter.
Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/languages/java/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ is a bundle of key value pairs representing the
See [semantic attributes](#semantic-attributes) for attribute constants
generated from the semantic conventions.

See [attribute naming](/docs/specs/semconv/general/attribute-naming/) for
guidance on attribute naming.
See [attribute naming](/docs/specs/semconv/general/naming/) for guidance on
attribute naming.

The following code snippet explores `Attributes` API usage:

Expand Down
42 changes: 11 additions & 31 deletions scripts/content-modules/adjust-pages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
qw(
spec: 1.41.0
otlp: 1.5.0
semconv: 1.29.0
semconv: 1.30.0
);
# Versions map without the colon in the keys
my %versions = map { s/://r => $versionsRaw{$_} } keys %versionsRaw;
Expand Down Expand Up @@ -93,28 +93,21 @@ ($$$)
return 0;
}

sub patchAttrNaming() {
return unless $ARGV =~ /^tmp\/otel\/specification/
&& applyPatchOrPrintMsgIf('2025-01-22-attribute-naming', 'semconv', '1.29.0');

my $semconv_attr_naming = '(/docs/specs/semconv/general)/naming/';
s|$semconv_attr_naming|$1/attribute-naming/|g if /$semconv_attr_naming/;
}

sub patchEventAliases() {
return unless $ARGV =~ /^tmp\/otel\/specification\/logs\//
&& applyPatchOrPrintMsgIf('2025-01-23-event-aliases', 'spec', '1.41.0');

my $aliases = '^( - )(event-(api|sdk))$';
s|$aliases|$1./$2|g if /$aliases/;
s|$aliases|$1./$2|;
}

sub patchSemConvAlias() {
return unless $ARGV =~ /^tmp\/semconv\/docs\/general\//
&& applyPatchOrPrintMsgIf('2025-01-23-general-aliases', 'semconv', '1.29.0');
sub patchSemConv1_30_0() {
return unless $ARGV =~ /^tmp\/semconv\/docs\//
&& applyPatchOrPrintMsgIf('2025-01-24-emit-an-event', 'semconv', '1.30.0');

my $aliases = '\[docs/specs/semconv/general/(trace-general)\]';
s|$aliases|[$1]|g if /$aliases/;
s|Emit Event API|Log API|;
s|(docs/specs/otel/logs/api.md#emit-a)n-event|$1-logrecord|;
s|\[semantic-convention-groups\]|[group-stability]|;
}

sub getVersFromSubmodule() {
Expand Down Expand Up @@ -158,9 +151,8 @@ ()
while(<>) {
$lineNum++;
last if /^-?-->/;
patchAttrNaming();
patchEventAliases();
patchSemConvAlias();
patchSemConv1_30_0();
$frontMatterFromFile .= $_;
}
next;
Expand Down Expand Up @@ -193,28 +185,14 @@ ()
## Semconv

if ($ARGV =~ /^tmp\/semconv/) {
if (applyPatchOrPrintMsgIf('2025-01-22-event-(api|sdk)', 'semconv', '1.29.0')) {
# Cf. https://github.com/open-telemetry/opentelemetry-specification/pull/4359
my $otel_spec_event_deprecation = '(opentelemetry-specification/blob/main/specification/logs)/event-(api|sdk).md';
s|$otel_spec_event_deprecation\b|$1/|g if /$otel_spec_event_deprecation/;
}

s|(\]\()/docs/|$1$specBasePath/semconv/|g;
s|(\]:\s*)/docs/|$1$specBasePath/semconv/|;

s|\((/model/.*?)\)|($semconvSpecRepoUrl/tree/v$semconvVers/$1)|g;
}


# SPECIFICATION custom processing

if ($ARGV =~ /^tmp\/otel\/specification/ && applyPatchOrPrintMsgIf('2025-01-22-attribute-naming.md', 'semconv', '1.29.0')) {
my $semconv_attr_naming_md = '(semantic-conventions/blob/main/docs/general)/naming.md(#\w+)?';
s|$semconv_attr_naming_md\b|$1/attribute-naming.md|g if /$semconv_attr_naming_md/;
}

patchAttrNaming(); # TEMPORARY patch

s|\(https://github.com/open-telemetry/opentelemetry-specification\)|($specBasePath/otel/)|;
s|(\]\()/specification/|$1$specBasePath/otel/)|;
s|\.\./specification/(.*?\))|../otel/$1|g if $ARGV =~ /otel\/specification/;
Expand Down Expand Up @@ -254,5 +232,7 @@ ()

s|\]\((proto/opamp.proto)\)|]($opAmpSpecRepoUrl/blob/main/$1)|;

patchSemConv1_30_0();

print;
}
Loading

0 comments on commit 149cb6f

Please sign in to comment.