Skip to content

Commit bd6e136

Browse files
Copilottrask
andauthored
Update semantic conventions to 1.38.0 (#384)
* Initial plan * Update semantic conventions to 1.38.0 Co-authored-by: trask <218610+trask@users.noreply.github.com> * Exclude 'Uncategorized.' from deprecation messages in generated code Co-authored-by: trask <218610+trask@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: trask <218610+trask@users.noreply.github.com>
1 parent f3d6a51 commit bd6e136

30 files changed

Lines changed: 706 additions & 122 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
* Bump to semconv v1.38.0
6+
57
## Version 1.37.0 (2025-08-27)
68

79
* Bump to semconv v1.37.0

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ val snapshot = true
1111
// end
1212

1313
// The release version of https://github.com/open-telemetry/semantic-conventions used to generate classes
14-
var semanticConventionsVersion = "1.37.0"
14+
var semanticConventionsVersion = "1.38.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.37.0",
1718
"1.36.0",
1819
"1.35.0",
1920
"1.34.0",

buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ public final class {{ my_class_name }} {
4343
{%- for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) | rejectattr("type", "eq", "any") -%}
4444
{%- if attribute is experimental -%}
4545
{%- if attribute is deprecated -%}
46-
{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%}
46+
{%- if attribute.deprecated.note == "Uncategorized." -%}
47+
{%- set deprecated_javadoc = "@deprecated" -%}
48+
{%- else -%}
49+
{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%}
50+
{%- endif -%}
4751
{%- else -%}
4852
{%- set deprecated_javadoc = "" -%}
4953
{%- endif -%}
@@ -80,7 +84,11 @@ public final class {{ my_class_name }} {
8084
* @deprecated deprecated in favor of stable {@link {{stable_class_link}}}.
8185
*/
8286
{%- elif attribute is deprecated -%}
83-
{{ ["Values for {@link #" ~ attribute.name | screaming_snake_case ~ "}", "@deprecated " ~ attribute.deprecated.note ] | comment }}
87+
{%- if attribute.deprecated.note == "Uncategorized." -%}
88+
{{ ["Values for {@link #" ~ attribute.name | screaming_snake_case ~ "}", "@deprecated"] | comment }}
89+
{%- else -%}
90+
{{ ["Values for {@link #" ~ attribute.name | screaming_snake_case ~ "}", "@deprecated " ~ attribute.deprecated.note ] | comment }}
91+
{%- endif -%}
8492
{%- else -%}
8593
/** Values for {@link #{{ attribute.name | screaming_snake_case }}}. */
8694
{%- endif -%}
@@ -90,7 +98,11 @@ public final class {{ my_class_name }} {
9098
public static final class {{ attribute.name | pascal_case }}IncubatingValues {
9199
{%- for member in attribute.type.members %}
92100
{%- if member is experimental and member is deprecated -%}
93-
{{ [member.brief or (member.id ~ '.'), "@deprecated " ~ member.deprecated.note] | comment }}
101+
{%- if member.deprecated.note == "Uncategorized." -%}
102+
{{ [member.brief or (member.id ~ '.'), "@deprecated"] | comment }}
103+
{%- else -%}
104+
{{ [member.brief or (member.id ~ '.'), "@deprecated " ~ member.deprecated.note] | comment }}
105+
{%- endif -%}
94106
@Deprecated public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }};
95107
{% elif member is experimental or enum_deprecated_in_favor_of_stable.value %}
96108
{{ [member.brief or (member.id ~ '.')] | comment }}

buildscripts/templates/registry/java/SemanticAttributes.java.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ public final class {{ my_class_name }} {
4141
{%- for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) -%}
4242
{%- if attribute is stable -%}
4343
{%- if attribute is deprecated -%}
44-
{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%}
44+
{%- if attribute.deprecated.note == "Uncategorized." -%}
45+
{%- set deprecated_javadoc = "@deprecated" -%}
46+
{%- else -%}
47+
{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%}
48+
{%- endif -%}
4549
{%- endif -%}
4650
{{ [attribute.brief, concat_if("\n\nNotes:\n\n", attribute.note), deprecated_javadoc] | comment }}
4751
{%- if attribute is deprecated -%}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
Comparing source compatibility of opentelemetry-semconv-1.37.0-SNAPSHOT.jar against opentelemetry-semconv-1.37.0.jar
2-
No changes.
1+
Comparing source compatibility of opentelemetry-semconv-1.38.0-SNAPSHOT.jar against opentelemetry-semconv-1.37.0.jar
2+
*** MODIFIED CLASS: PUBLIC FINAL io.opentelemetry.semconv.SchemaUrls (not serializable)
3+
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
4+
+++ NEW FIELD: PUBLIC(+) STATIC(+) FINAL(+) java.lang.String V1_38_0

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AppIncubatingAttributes.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,29 @@ public final class AppIncubatingAttributes {
7777
public static final AttributeKey<Long> APP_SCREEN_COORDINATE_Y =
7878
longKey("app.screen.coordinate.y");
7979

80+
/**
81+
* An identifier that uniquely differentiates this screen from other screens in the same
82+
* application.
83+
*
84+
* <p>Notes:
85+
*
86+
* <p>A screen represents only the part of the device display drawn by the app. It typically
87+
* contains multiple widgets or UI components and is larger in scope than individual widgets.
88+
* Multiple screens can coexist on the same display simultaneously (e.g., split view on tablets).
89+
*/
90+
public static final AttributeKey<String> APP_SCREEN_ID = stringKey("app.screen.id");
91+
92+
/**
93+
* The name of an application screen.
94+
*
95+
* <p>Notes:
96+
*
97+
* <p>A screen represents only the part of the device display drawn by the app. It typically
98+
* contains multiple widgets or UI components and is larger in scope than individual widgets.
99+
* Multiple screens can coexist on the same display simultaneously (e.g., split view on tablets).
100+
*/
101+
public static final AttributeKey<String> APP_SCREEN_NAME = stringKey("app.screen.name");
102+
80103
/**
81104
* An identifier that uniquely differentiates this widget from other widgets in the same
82105
* application.

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/AzureIncubatingAttributes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public final class AzureIncubatingAttributes {
3939
* <p>Notes:
4040
*
4141
* <p>Region name matches the format of {@code displayName} in <a
42-
* href="https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location">Azure
42+
* href="https://learn.microsoft.com/rest/api/resources/subscriptions/list-locations">Azure
4343
* Location API</a>
4444
*/
4545
public static final AttributeKey<List<String>> AZURE_COSMOSDB_OPERATION_CONTACTED_REGIONS =

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/ContainerIncubatingAttributes.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public final class ContainerIncubatingAttributes {
8282
*
8383
* <p>Docker defines a sha256 of the image id; {@code container.image.id} corresponds to the
8484
* {@code Image} field from the Docker container inspect <a
85-
* href="https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect">API</a>
85+
* href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Container/operation/ContainerInspect">API</a>
8686
* endpoint. K8s defines a link to the container registry repository with digest {@code "imageID":
8787
* "registry.azurecr.io
8888
* /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"}.
@@ -101,7 +101,7 @@ public final class ContainerIncubatingAttributes {
101101
* <p>Notes:
102102
*
103103
* <p><a
104-
* href="https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect">Docker</a>
104+
* href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect">Docker</a>
105105
* and <a
106106
* href="https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238">CRI</a>
107107
* report those under the {@code RepoDigests} field.
@@ -111,9 +111,9 @@ public final class ContainerIncubatingAttributes {
111111

112112
/**
113113
* Container image tags. An example can be found in <a
114-
* href="https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect">Docker Image
115-
* Inspect</a>. Should be only the {@code <tag>} section of the full name for example from {@code
116-
* registry.example.com/my-org/my-image:<tag>}.
114+
* href="https://docs.docker.com/reference/api/engine/version/v1.43/#tag/Image/operation/ImageInspect">Docker
115+
* Image Inspect</a>. Should be only the {@code <tag>} section of the full name for example from
116+
* {@code registry.example.com/my-org/my-image:<tag>}.
117117
*/
118118
public static final AttributeKey<List<String>> CONTAINER_IMAGE_TAGS =
119119
stringArrayKey("container.image.tags");

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DbIncubatingAttributes.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public final class DbIncubatingAttributes {
217217
/**
218218
* Deprecated, use {@code db.response.status_code} instead.
219219
*
220-
* @deprecated Replaced by {@code db.response.status_code}.
220+
* @deprecated Use {@code db.response.status_code} instead.
221221
*/
222222
@Deprecated
223223
public static final AttributeKey<Long> DB_COSMOSDB_STATUS_CODE =
@@ -393,15 +393,18 @@ public final class DbIncubatingAttributes {
393393
* <p>{@code db.query.parameter.<key>} SHOULD match up with the parameterized placeholders present
394394
* in {@code db.query.text}.
395395
*
396+
* <p>It is RECOMMENDED to capture the value as provided by the application without attempting to
397+
* do any case normalization.
398+
*
396399
* <p>{@code db.query.parameter.<key>} SHOULD NOT be captured on batch operations.
397400
*
398401
* <p>Examples:
399402
*
400403
* <ul>
401404
* <li>For a query {@code SELECT * FROM users where username = %s} with the parameter {@code
402405
* "jdoe"}, the attribute {@code db.query.parameter.0} SHOULD be set to {@code "jdoe"}.
403-
* <li>For a query {@code "SELECT * FROM users WHERE username = %(username)s;} with parameter
404-
* {@code username = "jdoe"}, the attribute {@code db.query.parameter.username} SHOULD be
406+
* <li>For a query {@code "SELECT * FROM users WHERE username = %(userName)s;} with parameter
407+
* {@code userName = "jdoe"}, the attribute {@code db.query.parameter.userName} SHOULD be
405408
* set to {@code "jdoe"}.
406409
* </ul>
407410
*/
@@ -452,7 +455,7 @@ public final class DbIncubatingAttributes {
452455
/**
453456
* Deprecated, use {@code db.namespace} instead.
454457
*
455-
* @deprecated Replaced by {@code db.namespace}.
458+
* @deprecated
456459
*/
457460
@Deprecated
458461
public static final AttributeKey<Long> DB_REDIS_DATABASE_INDEX =

semconv-incubating/src/main/java/io/opentelemetry/semconv/incubating/DnsIncubatingAttributes.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ public final class DnsIncubatingAttributes {
2323
*
2424
* <p>Notes:
2525
*
26-
* <p>If the name field contains non-printable characters (below 32 or above 126), those
27-
* characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes
28-
* should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n
29-
* respectively.
26+
* <p>The name represents the queried domain name as it appears in the DNS query without any
27+
* additional normalization.
3028
*/
3129
public static final AttributeKey<String> DNS_QUESTION_NAME = stringKey("dns.question.name");
3230

0 commit comments

Comments
 (0)