Skip to content

Commit 9202fd6

Browse files
authored
Update to semantic-conventions 1.25.0 (#61)
1 parent 66d1920 commit 9202fd6

31 files changed

+816
-73
lines changed

build.gradle.kts

Lines changed: 3 additions & 2 deletions
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.24.0"
14+
var semanticConventionsVersion = "1.25.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.24.0",
1718
"1.23.1",
1819
"1.22.0")
1920

@@ -52,7 +53,7 @@ nexusPublishing {
5253

5354
// start - define tasks to download, unzip, and generate from opentelemetry/semantic-conventions
5455
var generatorVersion = "0.24.0"
55-
val semanticConventionsRepoZip = "https://github.com/open-telemetry/semantic-conventions/archive/v$semanticConventionsVersion.zip"
56+
val semanticConventionsRepoZip = "https://github.com/open-telemetry/semantic-conventions/archive/v${semanticConventionsVersion}.zip"
5657
val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"
5758

5859
val downloadSemanticConventions by tasks.registering(Download::class) {

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

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public final class AwsIncubatingAttributes {
4343
stringKey("aws.dynamodb.exclusive_start_table");
4444

4545
/**
46-
* The JSON-serialized value of each item in the the {@code GlobalSecondaryIndexUpdates} request
46+
* The JSON-serialized value of each item in the {@code GlobalSecondaryIndexUpdates} request
4747
* field.
4848
*/
4949
public static final AttributeKey<List<String>> AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES =
@@ -94,7 +94,7 @@ public final class AwsIncubatingAttributes {
9494
/** The value of the {@code Select} request parameter. */
9595
public static final AttributeKey<String> AWS_DYNAMODB_SELECT = stringKey("aws.dynamodb.select");
9696

97-
/** The the number of items in the {@code TableNames} response parameter. */
97+
/** The number of items in the {@code TableNames} response parameter. */
9898
public static final AttributeKey<Long> AWS_DYNAMODB_TABLE_COUNT =
9999
longKey("aws.dynamodb.table_count");
100100

@@ -129,16 +129,23 @@ public final class AwsIncubatingAttributes {
129129
public static final AttributeKey<String> AWS_ECS_LAUNCHTYPE = stringKey("aws.ecs.launchtype");
130130

131131
/**
132-
* The ARN of an <a
133-
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html">ECS
134-
* task definition</a>.
132+
* The ARN of a running <a
133+
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">ECS
134+
* task</a>.
135135
*/
136136
public static final AttributeKey<String> AWS_ECS_TASK_ARN = stringKey("aws.ecs.task.arn");
137137

138-
/** The task definition family this task definition is a member of. */
138+
/**
139+
* The family name of the <a
140+
* href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html">ECS
141+
* task definition</a> used to create the ECS task.
142+
*/
139143
public static final AttributeKey<String> AWS_ECS_TASK_FAMILY = stringKey("aws.ecs.task.family");
140144

141-
/** The revision for this task definition. */
145+
/** The ID of a running ECS task. The ID MUST be extracted from {@code task.arn}. */
146+
public static final AttributeKey<String> AWS_ECS_TASK_ID = stringKey("aws.ecs.task.id");
147+
148+
/** The revision for the task definition used to create the ECS task. */
142149
public static final AttributeKey<String> AWS_ECS_TASK_REVISION =
143150
stringKey("aws.ecs.task.revision");
144151

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ public static final class CloudPlatformValues {
131131
/** Azure Virtual Machines. */
132132
public static final String AZURE_VM = "azure_vm";
133133

134+
/** Azure Container Apps. */
135+
public static final String AZURE_CONTAINER_APPS = "azure_container_apps";
136+
134137
/** Azure Container Instances. */
135138
public static final String AZURE_CONTAINER_INSTANCES = "azure_container_instances";
136139

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public final class ContainerIncubatingAttributes {
4040
public static final AttributeKey<String> CONTAINER_COMMAND_LINE =
4141
stringKey("container.command_line");
4242

43+
/** The CPU state for this data point. */
44+
public static final AttributeKey<String> CONTAINER_CPU_STATE = stringKey("container.cpu.state");
45+
4346
/**
4447
* Container ID. Usually a UUID, as for example used to <a
4548
* href="https://docs.docker.com/engine/reference/run/#container-identification">identify Docker
@@ -95,6 +98,15 @@ public final class ContainerIncubatingAttributes {
9598
stringArrayKey("container.image.tags");
9699

97100
/** Container labels, {@code <key>} being the label name, the value being the label value. */
101+
public static final AttributeKeyTemplate<String> CONTAINER_LABEL =
102+
stringKeyTemplate("container.label");
103+
104+
/**
105+
* Deprecated, use {@code container.label} instead.
106+
*
107+
* @deprecated Deprecated, use `container.label` instead.
108+
*/
109+
@Deprecated
98110
public static final AttributeKeyTemplate<String> CONTAINER_LABELS =
99111
stringKeyTemplate("container.labels");
100112

@@ -104,5 +116,26 @@ public final class ContainerIncubatingAttributes {
104116
/** The container runtime managing this container. */
105117
public static final AttributeKey<String> CONTAINER_RUNTIME = stringKey("container.runtime");
106118

119+
// Enum definitions
120+
/** Values for {@link #CONTAINER_CPU_STATE}. */
121+
public static final class ContainerCpuStateValues {
122+
/**
123+
* When tasks of the cgroup are in user mode (Linux). When all container processes are in user
124+
* mode (Windows).
125+
*/
126+
public static final String USER = "user";
127+
128+
/** When CPU is used by the system (host OS). */
129+
public static final String SYSTEM = "system";
130+
131+
/**
132+
* When tasks of the cgroup are in kernel mode (Linux). When all container processes are in
133+
* kernel mode (Windows).
134+
*/
135+
public static final String KERNEL = "kernel";
136+
137+
private ContainerCpuStateValues() {}
138+
}
139+
107140
private ContainerIncubatingAttributes() {}
108141
}

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

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,11 @@ public final class DbIncubatingAttributes {
6565
public static final AttributeKey<String> DB_CASSANDRA_TABLE = stringKey("db.cassandra.table");
6666

6767
/**
68-
* The connection string used to connect to the database. It is recommended to remove embedded
69-
* credentials.
68+
* Deprecated, use {@code server.address}, {@code server.port} attributes instead.
69+
*
70+
* @deprecated Deprecated, use `server.address`, `server.port` attributes instead.
7071
*/
72+
@Deprecated
7173
public static final AttributeKey<String> DB_CONNECTION_STRING = stringKey("db.connection_string");
7274

7375
/** Unique Cosmos client instance id. */
@@ -107,8 +109,11 @@ public final class DbIncubatingAttributes {
107109
stringKey("db.elasticsearch.cluster.name");
108110

109111
/**
110-
* Represents the human-readable identifier of the node/instance to which a request was routed.
112+
* Deprecated, use {@code db.instance.id} instead.
113+
*
114+
* @deprecated Deprecated, use `db.instance.id` instead.
111115
*/
116+
@Deprecated
112117
public static final AttributeKey<String> DB_ELASTICSEARCH_NODE_NAME =
113118
stringKey("db.elasticsearch.node.name");
114119

@@ -138,10 +143,11 @@ public final class DbIncubatingAttributes {
138143
public static final AttributeKey<String> DB_INSTANCE_ID = stringKey("db.instance.id");
139144

140145
/**
141-
* The fully-qualified class name of the <a
142-
* href="https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/">Java Database Connectivity
143-
* (JDBC)</a> driver used to connect.
146+
* Removed, no replacement at this time.
147+
*
148+
* @deprecated Removed, no replacement at this time.
144149
*/
150+
@Deprecated
145151
public static final AttributeKey<String> DB_JDBC_DRIVER_CLASSNAME =
146152
stringKey("db.jdbc.driver_classname");
147153

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public final class DnsIncubatingAttributes {
2020
* <p>Notes:
2121
*
2222
* <ul>
23-
* <li>The name being queried. If the name field contains non-printable characters (below 32 or
24-
* above 126), those characters should be represented as escaped base 10 integers (\DDD).
25-
* Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should
26-
* be converted to \t, \r, and \n respectively.
23+
* <li>If the name field contains non-printable characters (below 32 or above 126), those
24+
* characters should be represented as escaped base 10 integers (\DDD). Back slashes and
25+
* quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to
26+
* \t, \r, and \n respectively.
2727
* </ul>
2828
*/
2929
public static final AttributeKey<String> DNS_QUESTION_NAME = stringKey("dns.question.name");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public final class EventIncubatingAttributes {
2121
*
2222
* <ul>
2323
* <li>Event names are subject to the same rules as <a
24-
* href="https://github.com/open-telemetry/opentelemetry-specification/tree/v1.26.0/specification/common/attribute-naming.md">attribute
24+
* href="https://github.com/open-telemetry/opentelemetry-specification/tree/v1.31.0/specification/common/attribute-naming.md">attribute
2525
* names</a>. Notably, event names are namespaced to avoid collisions and provide a clean
2626
* separation of semantics for events in separate domains like browser, mobile, and
2727
* kubernetes.

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

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,40 @@ public final class ExceptionIncubatingAttributes {
3535
* exception.escaped} attribute was not set or set to false, since the event might have been
3636
* recorded at a time where it was not clear whether the exception will escape.
3737
* </ul>
38+
*
39+
* @deprecated deprecated in favor of stable {@link
40+
* io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_ESCAPED} attribute.
3841
*/
42+
@Deprecated
3943
public static final AttributeKey<Boolean> EXCEPTION_ESCAPED = booleanKey("exception.escaped");
4044

41-
/** The exception message. */
45+
/**
46+
* The exception message.
47+
*
48+
* @deprecated deprecated in favor of stable {@link
49+
* io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_MESSAGE} attribute.
50+
*/
51+
@Deprecated
4252
public static final AttributeKey<String> EXCEPTION_MESSAGE = stringKey("exception.message");
4353

4454
/**
4555
* A stacktrace as a string in the natural representation for the language runtime. The
4656
* representation is to be determined and documented by each language SIG.
57+
*
58+
* @deprecated deprecated in favor of stable {@link
59+
* io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_STACKTRACE} attribute.
4760
*/
61+
@Deprecated
4862
public static final AttributeKey<String> EXCEPTION_STACKTRACE = stringKey("exception.stacktrace");
4963

5064
/**
5165
* The type of the exception (its fully-qualified class name, if applicable). The dynamic type of
5266
* the exception should be preferred over the static type in languages that support it.
67+
*
68+
* @deprecated deprecated in favor of stable {@link
69+
* io.opentelemetry.semconv.ExceptionAttributes#EXCEPTION_TYPE} attribute.
5370
*/
54-
public static final AttributeKey<String> EXCEPTION_TYPE = stringKey("exception.type");
71+
@Deprecated public static final AttributeKey<String> EXCEPTION_TYPE = stringKey("exception.type");
5572

5673
private ExceptionIncubatingAttributes() {}
5774
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
package io.opentelemetry.semconv.incubating;
7+
8+
import static io.opentelemetry.api.common.AttributeKey.longKey;
9+
import static io.opentelemetry.api.common.AttributeKey.stringKey;
10+
11+
import io.opentelemetry.api.common.AttributeKey;
12+
13+
// DO NOT EDIT, this is an Auto-generated file from
14+
// buildscripts/templates/SemanticAttributes.java.j2
15+
@SuppressWarnings("unused")
16+
public final class FileIncubatingAttributes {
17+
18+
/** Directory where the file is located. It should include the drive letter, when appropriate. */
19+
public static final AttributeKey<String> FILE_DIRECTORY = stringKey("file.directory");
20+
21+
/**
22+
* File extension, excluding the leading dot.
23+
*
24+
* <p>Notes:
25+
*
26+
* <ul>
27+
* <li>When the file name has multiple extensions (example.tar.gz), only the last one should be
28+
* captured (&quot;gz&quot;, not &quot;tar.gz&quot;).
29+
* </ul>
30+
*/
31+
public static final AttributeKey<String> FILE_EXTENSION = stringKey("file.extension");
32+
33+
/** Name of the file including the extension, without the directory. */
34+
public static final AttributeKey<String> FILE_NAME = stringKey("file.name");
35+
36+
/**
37+
* Full path to the file, including the file name. It should include the drive letter, when
38+
* appropriate.
39+
*/
40+
public static final AttributeKey<String> FILE_PATH = stringKey("file.path");
41+
42+
/** File size in bytes. */
43+
public static final AttributeKey<Long> FILE_SIZE = longKey("file.size");
44+
45+
private FileIncubatingAttributes() {}
46+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public final class HostIncubatingAttributes {
3636
public static final AttributeKey<String> HOST_CPU_MODEL_NAME = stringKey("host.cpu.model.name");
3737

3838
/** Stepping or core revisions. */
39-
public static final AttributeKey<Long> HOST_CPU_STEPPING = longKey("host.cpu.stepping");
39+
public static final AttributeKey<String> HOST_CPU_STEPPING = stringKey("host.cpu.stepping");
4040

4141
/**
4242
* Processor manufacturer identifier. A maximum 12-character string.

0 commit comments

Comments
 (0)