Skip to content

Commit c27c2d0

Browse files
committed
Update to semconv 1.33.0 and weaver 0.15.0
1 parent 4ed80a5 commit c27c2d0

30 files changed

+1718
-734
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.32.0"
14+
var semanticConventionsVersion = "1.33.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.32.0",
1718
"1.31.0",
1819
"1.30.0",
1920
"1.29.0",
@@ -110,7 +111,7 @@ fun generateTask(taskName: String, incubating: Boolean) {
110111
"--mount", "type=bind,source=${modelPath},target=/home/weaver/source,readonly",
111112
"--mount", "type=bind,source=$projectDir/buildscripts/templates,target=/home/weaver/templates,readonly",
112113
"--mount", "type=bind,source=$projectDir/$outputDir,target=/home/weaver/target",
113-
"otel/weaver:v0.14.0",
114+
"otel/weaver:v0.15.0",
114115
"registry", "generate",
115116
"--registry=/home/weaver/source",
116117
"--templates=/home/weaver/templates",

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

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package io.opentelemetry.semconv.incubating;
77

8+
import static io.opentelemetry.api.common.AttributeKey.longKey;
89
import static io.opentelemetry.api.common.AttributeKey.stringKey;
910

1011
import io.opentelemetry.api.common.AttributeKey;
@@ -48,6 +49,33 @@ public final class AppIncubatingAttributes {
4849
*/
4950
public static final AttributeKey<String> APP_INSTALLATION_ID = stringKey("app.installation.id");
5051

52+
/** The x (horizontal) coordinate of a screen coordinate, in screen pixels. */
53+
public static final AttributeKey<Long> APP_SCREEN_COORDINATE_X =
54+
longKey("app.screen.coordinate.x");
55+
56+
/** The y (vertical) component of a screen coordinate, in screen pixels. */
57+
public static final AttributeKey<Long> APP_SCREEN_COORDINATE_Y =
58+
longKey("app.screen.coordinate.y");
59+
60+
/**
61+
* An identifier that uniquely differentiates this widget from other widgets in the same
62+
* application.
63+
*
64+
* <p>Notes:
65+
*
66+
* <p>A widget is an application component, typically an on-screen visual GUI element.
67+
*/
68+
public static final AttributeKey<String> APP_WIDGET_ID = stringKey("app.widget.id");
69+
70+
/**
71+
* The name of an application widget.
72+
*
73+
* <p>Notes:
74+
*
75+
* <p>A widget is an application component, typically an on-screen visual GUI element.
76+
*/
77+
public static final AttributeKey<String> APP_WIDGET_NAME = stringKey("app.widget.name");
78+
5179
// Enum definitions
5280

5381
private AppIncubatingAttributes() {}

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
1414
@SuppressWarnings("unused")
1515
public final class CicdIncubatingAttributes {
16+
/** The kind of action a pipeline run is performing. */
17+
public static final AttributeKey<String> CICD_PIPELINE_ACTION_NAME =
18+
stringKey("cicd.pipeline.action.name");
19+
1620
/** The human readable name of the pipeline within a CI/CD system. */
1721
public static final AttributeKey<String> CICD_PIPELINE_NAME = stringKey("cicd.pipeline.name");
1822

@@ -45,6 +49,10 @@ public final class CicdIncubatingAttributes {
4549
public static final AttributeKey<String> CICD_PIPELINE_TASK_RUN_ID =
4650
stringKey("cicd.pipeline.task.run.id");
4751

52+
/** The result of a task run. */
53+
public static final AttributeKey<String> CICD_PIPELINE_TASK_RUN_RESULT =
54+
stringKey("cicd.pipeline.task.run.result");
55+
4856
/**
4957
* The <a href="https://wikipedia.org/wiki/URL">URL</a> of the pipeline task run, providing the
5058
* complete address in order to locate and identify the pipeline task run.
@@ -60,10 +68,36 @@ public final class CicdIncubatingAttributes {
6068
public static final AttributeKey<String> CICD_SYSTEM_COMPONENT =
6169
stringKey("cicd.system.component");
6270

71+
/** The unique identifier of a worker within a CICD system. */
72+
public static final AttributeKey<String> CICD_WORKER_ID = stringKey("cicd.worker.id");
73+
74+
/** The name of a worker within a CICD system. */
75+
public static final AttributeKey<String> CICD_WORKER_NAME = stringKey("cicd.worker.name");
76+
6377
/** The state of a CICD worker / agent. */
6478
public static final AttributeKey<String> CICD_WORKER_STATE = stringKey("cicd.worker.state");
6579

80+
/**
81+
* The <a href="https://wikipedia.org/wiki/URL">URL</a> of the worker, providing the complete
82+
* address in order to locate and identify the worker.
83+
*/
84+
public static final AttributeKey<String> CICD_WORKER_URL_FULL = stringKey("cicd.worker.url.full");
85+
6686
// Enum definitions
87+
/** Values for {@link #CICD_PIPELINE_ACTION_NAME}. */
88+
public static final class CicdPipelineActionNameIncubatingValues {
89+
/** The pipeline run is executing a build. */
90+
public static final String BUILD = "BUILD";
91+
92+
/** The pipeline run is executing. */
93+
public static final String RUN = "RUN";
94+
95+
/** The pipeline run is executing a sync. */
96+
public static final String SYNC = "SYNC";
97+
98+
private CicdPipelineActionNameIncubatingValues() {}
99+
}
100+
67101
/** Values for {@link #CICD_PIPELINE_RESULT}. */
68102
public static final class CicdPipelineResultIncubatingValues {
69103
/** The pipeline run finished successfully. */
@@ -114,6 +148,34 @@ public static final class CicdPipelineRunStateIncubatingValues {
114148
private CicdPipelineRunStateIncubatingValues() {}
115149
}
116150

151+
/** Values for {@link #CICD_PIPELINE_TASK_RUN_RESULT}. */
152+
public static final class CicdPipelineTaskRunResultIncubatingValues {
153+
/** The task run finished successfully. */
154+
public static final String SUCCESS = "success";
155+
156+
/**
157+
* The task run did not finish successfully, eg. due to a compile error or a failing test. Such
158+
* failures are usually detected by non-zero exit codes of the tools executed in the task run.
159+
*/
160+
public static final String FAILURE = "failure";
161+
162+
/**
163+
* The task run failed due to an error in the CICD system, eg. due to the worker being killed.
164+
*/
165+
public static final String ERROR = "error";
166+
167+
/** A timeout caused the task run to be interrupted. */
168+
public static final String TIMEOUT = "timeout";
169+
170+
/** The task run was cancelled, eg. by a user manually cancelling the task run. */
171+
public static final String CANCELLATION = "cancellation";
172+
173+
/** The task run was skipped, eg. due to a precondition not being met. */
174+
public static final String SKIP = "skip";
175+
176+
private CicdPipelineTaskRunResultIncubatingValues() {}
177+
}
178+
117179
/** Values for {@link #CICD_PIPELINE_TASK_TYPE}. */
118180
public static final class CicdPipelineTaskTypeIncubatingValues {
119181
/** build */

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

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,26 @@ public final class CodeIncubatingAttributes {
2323

2424
/**
2525
* The column number in {@code code.file.path} best representing the operation. It SHOULD point
26-
* within the code unit named in {@code code.function.name}.
26+
* within the code unit named in {@code code.function.name}. This attribute MUST NOT be used on
27+
* the Profile signal since the data is already captured in 'message Line'. This constraint is
28+
* imposed to prevent redundancy and maintain data integrity.
29+
*
30+
* @deprecated deprecated in favor of stable {@link
31+
* io.opentelemetry.semconv.CodeAttributes#CODE_COLUMN_NUMBER} attribute.
2732
*/
33+
@Deprecated
2834
public static final AttributeKey<Long> CODE_COLUMN_NUMBER = longKey("code.column.number");
2935

3036
/**
3137
* The source code file name that identifies the code unit as uniquely as possible (preferably an
32-
* absolute file path).
38+
* absolute file path). This attribute MUST NOT be used on the Profile signal since the data is
39+
* already captured in 'message Function'. This constraint is imposed to prevent redundancy and
40+
* maintain data integrity.
41+
*
42+
* @deprecated deprecated in favor of stable {@link
43+
* io.opentelemetry.semconv.CodeAttributes#CODE_FILE_PATH} attribute.
3344
*/
34-
public static final AttributeKey<String> CODE_FILE_PATH = stringKey("code.file.path");
45+
@Deprecated public static final AttributeKey<String> CODE_FILE_PATH = stringKey("code.file.path");
3546

3647
/**
3748
* Deprecated, use {@code code.file.path} instead
@@ -50,7 +61,9 @@ public final class CodeIncubatingAttributes {
5061
/**
5162
* The method or function fully-qualified name without arguments. The value should fit the natural
5263
* representation of the language runtime, which is also likely the same used within {@code
53-
* code.stacktrace} attribute value.
64+
* code.stacktrace} attribute value. This attribute MUST NOT be used on the Profile signal since
65+
* the data is already captured in 'message Function'. This constraint is imposed to prevent
66+
* redundancy and maintain data integrity.
5467
*
5568
* <p>Notes:
5669
*
@@ -72,14 +85,23 @@ public final class CodeIncubatingAttributes {
7285
* <li>Rust: {@code playground::my_module::my_cool_func}
7386
* <li>C function: {@code fopen}
7487
* </ul>
88+
*
89+
* @deprecated deprecated in favor of stable {@link
90+
* io.opentelemetry.semconv.CodeAttributes#CODE_FUNCTION_NAME} attribute.
7591
*/
92+
@Deprecated
7693
public static final AttributeKey<String> CODE_FUNCTION_NAME = stringKey("code.function.name");
7794

7895
/**
7996
* The line number in {@code code.file.path} best representing the operation. It SHOULD point
80-
* within the code unit named in {@code code.function.name}.
97+
* within the code unit named in {@code code.function.name}. This attribute MUST NOT be used on
98+
* the Profile signal since the data is already captured in 'message Line'. This constraint is
99+
* imposed to prevent redundancy and maintain data integrity.
100+
*
101+
* @deprecated deprecated in favor of stable {@link
102+
* io.opentelemetry.semconv.CodeAttributes#CODE_LINE_NUMBER} attribute.
81103
*/
82-
public static final AttributeKey<Long> CODE_LINE_NUMBER = longKey("code.line.number");
104+
@Deprecated public static final AttributeKey<Long> CODE_LINE_NUMBER = longKey("code.line.number");
83105

84106
/**
85107
* Deprecated, use {@code code.line.number} instead
@@ -100,8 +122,14 @@ public final class CodeIncubatingAttributes {
100122
* A stacktrace as a string in the natural representation for the language runtime. The
101123
* representation is identical to <a
102124
* href="/docs/exceptions/exceptions-spans.md#stacktrace-representation">{@code
103-
* exception.stacktrace}</a>.
125+
* exception.stacktrace}</a>. This attribute MUST NOT be used on the Profile signal since the data
126+
* is already captured in 'message Location'. This constraint is imposed to prevent redundancy and
127+
* maintain data integrity.
128+
*
129+
* @deprecated deprecated in favor of stable {@link
130+
* io.opentelemetry.semconv.CodeAttributes#CODE_STACKTRACE} attribute.
104131
*/
132+
@Deprecated
105133
public static final AttributeKey<String> CODE_STACKTRACE = stringKey("code.stacktrace");
106134

107135
// Enum definitions

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,14 @@ public final class ContainerIncubatingAttributes {
118118
public static final AttributeKey<List<String>> CONTAINER_IMAGE_TAGS =
119119
stringArrayKey("container.image.tags");
120120

121-
/** Container labels, {@code <key>} being the label name, the value being the label value. */
121+
/**
122+
* Container labels, {@code <key>} being the label name, the value being the label value.
123+
*
124+
* <p>Notes:
125+
*
126+
* <p>For example, a docker container label {@code app} with value {@code nginx} SHOULD be
127+
* recorded as the {@code container.label.app} attribute with value {@code "nginx"}.
128+
*/
122129
public static final AttributeKeyTemplate<String> CONTAINER_LABEL =
123130
stringKeyTemplate("container.label");
124131

0 commit comments

Comments
 (0)