Skip to content

Commit c80e6fe

Browse files
authored
Update to semconv 1.34.0 (#217)
* Update to semconv 1.34.0 * generate * Update to 0.15.1 * Disable javadoc validation for this release
1 parent 4197602 commit c80e6fe

File tree

58 files changed

+1133
-155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1133
-155
lines changed

build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ 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.34.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.33.0",
18+
"1.32.0",
1719
"1.31.0",
1820
"1.30.0",
1921
"1.29.0",
@@ -110,7 +112,7 @@ fun generateTask(taskName: String, incubating: Boolean) {
110112
"--mount", "type=bind,source=${modelPath},target=/home/weaver/source,readonly",
111113
"--mount", "type=bind,source=$projectDir/buildscripts/templates,target=/home/weaver/templates,readonly",
112114
"--mount", "type=bind,source=$projectDir/$outputDir,target=/home/weaver/target",
113-
"otel/weaver:v0.15.0",
115+
"otel/weaver:v0.15.1",
114116
"registry", "generate",
115117
"--registry=/home/weaver/source",
116118
"--templates=/home/weaver/templates",

buildSrc/src/main/kotlin/otel.java-conventions.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ tasks {
7676
breakIterator(true)
7777

7878
addBooleanOption("html5", true)
79-
addBooleanOption("Xdoclint:all,-missing", true)
79+
// TODO (trask) remove "-html" after next semconv release
80+
// (see https://github.com/open-telemetry/semantic-conventions/pull/2304)
81+
addBooleanOption("Xdoclint:all,-missing,-html", true)
8082
// non-standard option to fail on warnings, see https://bugs.openjdk.java.net/browse/JDK-8200363
8183
addStringOption("Xwerror", "-quiet")
8284
}

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

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import java.util.List;
3636
// DO NOT EDIT, this is an Auto-generated file from buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
3737
@SuppressWarnings("unused")
3838
public final class {{ my_class_name }} {
39-
{% for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) %}{% if attribute is experimental %}
39+
{% for attribute in ctx.attributes | rejectattr("name", "in", ctx.excluded_attributes) | rejectattr("type", "eq", "any") %}{% if attribute is experimental %}
4040
{%- if attribute is deprecated %}{%- set deprecated_javadoc = "@deprecated " ~ attribute.deprecated.note -%}
4141
{%- else -%}{%- set deprecated_javadoc = "" -%}
4242
{%- endif -%}
@@ -49,8 +49,19 @@ public final class {{ my_class_name }} {
4949
{% endif %}
5050
{% endfor %}
5151
// Enum definitions
52-
{% for attribute in ctx.attributes | select("enum") | rejectattr("name", "in", ctx.excluded_attributes) %}
53-
{%- if attribute is stable -%}
52+
{% for attribute in ctx.attributes | select("enum") | rejectattr("name", "in", ctx.excluded_attributes) %}
53+
{% set enum_deprecated_in_favor_of_stable = namespace(value=false) %}
54+
{% if attribute is stable %}
55+
{%- set enum_deprecated_in_favor_of_stable.value = true -%}
56+
{%- endif -%}
57+
{%- for member in attribute.type.members %}
58+
{% if member is experimental %}
59+
{% if not member is deprecated %}
60+
{%- set enum_deprecated_in_favor_of_stable.value = false -%}
61+
{%- endif -%}
62+
{%- endif -%}
63+
{%- endfor %}
64+
{%- if enum_deprecated_in_favor_of_stable.value -%}
5465
{%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "." ~ (attribute.name | pascal_case) ~ "Values" -%}
5566
/**
5667
* Values for {@link #{{ attribute.name | screaming_snake_case }}}.
@@ -62,11 +73,16 @@ public final class {{ my_class_name }} {
6273
{%- else -%}
6374
/** Values for {@link #{{ attribute.name | screaming_snake_case }}}. */
6475
{%- endif -%}
65-
{% if attribute is stable or attribute is deprecated %}@Deprecated{% endif %}
76+
{% if enum_deprecated_in_favor_of_stable.value or attribute is deprecated %}@Deprecated{% endif %}
6677
public static final class {{ attribute.name | pascal_case }}IncubatingValues {
6778
{%- for member in attribute.type.members %}
68-
{{ [member.brief or (member.id ~ '.')] | comment(indent=4) }}
69-
public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }};
79+
{% if member is experimental or enum_deprecated_in_favor_of_stable.value %}{{ [member.brief or (member.id ~ '.')] | comment(indent=4) }}
80+
{% if member is deprecated %}@Deprecated{% endif %} public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }};
81+
{% elif member is stable %}
82+
{%- set stable_class_link = "io.opentelemetry.semconv." ~ stable_class_name ~ "." ~ (attribute.name | pascal_case) ~ "Values#" ~ (member.id | screaming_snake_case) -%}
83+
{{ [member.brief or (member.id ~ '.'), "@deprecated deprecated in favor of stable {@link " ~ stable_class_link ~ "} value."] | comment(indent=4) }}
84+
@Deprecated public static final {{ attribute.type | instantiated_type | map_text("java_enum_type") }} {{ member.id | screaming_snake_case }} = {{ member.value | print_member_value }};
85+
{%- endif -%}
7086
{%- endfor %}
7187
private {{ attribute.name | pascal_case }}IncubatingValues() {}
7288
}

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,14 @@ public final class AndroidIncubatingAttributes {
3232
public static final AttributeKey<String> ANDROID_OS_API_LEVEL = stringKey("android.os.api_level");
3333

3434
/**
35-
* Deprecated. Use {@code android.app.state} instead.
35+
* Deprecated. Use {@code android.app.state} body field instead.
3636
*
37-
* <p>Notes:
38-
*
39-
* <p>The Android lifecycle states are defined in <a
40-
* href="https://developer.android.com/guide/components/activities/activity-lifecycle#lc">Activity
41-
* lifecycle callbacks</a>, and from which the {@code OS identifiers} are derived.
42-
*
43-
* @deprecated Renamed to {@code android.app.state}
37+
* @deprecated Use {@code android.app.state} body field instead.
4438
*/
4539
@Deprecated public static final AttributeKey<String> ANDROID_STATE = stringKey("android.state");
4640

4741
// Enum definitions
42+
4843
/** Values for {@link #ANDROID_APP_STATE}. */
4944
public static final class AndroidAppStateIncubatingValues {
5045
/**
@@ -71,7 +66,7 @@ private AndroidAppStateIncubatingValues() {}
7166
/**
7267
* Values for {@link #ANDROID_STATE}
7368
*
74-
* @deprecated Renamed to {@code android.app.state}
69+
* @deprecated Use {@code android.app.state} body field instead.
7570
*/
7671
@Deprecated
7772
public static final class AndroidStateIncubatingValues {

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/AwsIncubatingAttributes.java

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@
1818
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
1919
@SuppressWarnings("unused")
2020
public final class AwsIncubatingAttributes {
21+
/**
22+
* The unique identifier of the AWS Bedrock Guardrail. A <a
23+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html">guardrail</a> helps
24+
* safeguard and prevent unwanted behavior from model responses or user messages.
25+
*/
26+
public static final AttributeKey<String> AWS_BEDROCK_GUARDRAIL_ID =
27+
stringKey("aws.bedrock.guardrail.id");
28+
29+
/**
30+
* The unique identifier of the AWS Bedrock Knowledge base. A <a
31+
* href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html">knowledge
32+
* base</a> is a bank of information that can be queried by models to generate more relevant
33+
* responses and augment prompts.
34+
*/
35+
public static final AttributeKey<String> AWS_BEDROCK_KNOWLEDGE_BASE_ID =
36+
stringKey("aws.bedrock.knowledge_base.id");
37+
2138
/** The JSON-serialized value of each item in the {@code AttributeDefinitions} request field. */
2239
public static final AttributeKey<List<String>> AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS =
2340
stringArrayKey("aws.dynamodb.attribute_definitions");
@@ -155,6 +172,16 @@ public final class AwsIncubatingAttributes {
155172
public static final AttributeKey<String> AWS_EXTENDED_REQUEST_ID =
156173
stringKey("aws.extended_request_id");
157174

175+
/**
176+
* The name of the AWS Kinesis <a
177+
* href="https://docs.aws.amazon.com/streams/latest/dev/introduction.html">stream</a> the request
178+
* refers to. Corresponds to the {@code --stream-name} parameter of the Kinesis <a
179+
* href="https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html">describe-stream</a>
180+
* operation.
181+
*/
182+
public static final AttributeKey<String> AWS_KINESIS_STREAM_NAME =
183+
stringKey("aws.kinesis.stream_name");
184+
158185
/**
159186
* The full invoked ARN as provided on the {@code Context} passed to the function ({@code
160187
* Lambda-Runtime-Invoked-Function-Arn} header on the {@code /runtime/invocation/next}
@@ -167,6 +194,18 @@ public final class AwsIncubatingAttributes {
167194
public static final AttributeKey<String> AWS_LAMBDA_INVOKED_ARN =
168195
stringKey("aws.lambda.invoked_arn");
169196

197+
/**
198+
* The UUID of the <a
199+
* href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html">AWS
200+
* Lambda EvenSource Mapping</a>. An event source is mapped to a lambda function. It's contents
201+
* are read by Lambda and used to trigger a function. This isn't available in the lambda execution
202+
* context or the lambda runtime environtment. This is going to be populated by the AWS SDK for
203+
* each language when that UUID is present. Some of these operations are
204+
* Create/Delete/Get/List/Update EventSourceMapping.
205+
*/
206+
public static final AttributeKey<String> AWS_LAMBDA_RESOURCE_MAPPING_ID =
207+
stringKey("aws.lambda.resource_mapping.id");
208+
170209
/**
171210
* The Amazon Resource Name(s) (ARN) of the AWS log group(s).
172211
*
@@ -341,7 +380,33 @@ public final class AwsIncubatingAttributes {
341380
*/
342381
public static final AttributeKey<String> AWS_S3_UPLOAD_ID = stringKey("aws.s3.upload_id");
343382

383+
/** The ARN of the Secret stored in the Secrets Mangger */
384+
public static final AttributeKey<String> AWS_SECRETSMANAGER_SECRET_ARN =
385+
stringKey("aws.secretsmanager.secret.arn");
386+
387+
/**
388+
* The ARN of the AWS SNS Topic. An Amazon SNS <a
389+
* href="https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html">topic</a> is a logical
390+
* access point that acts as a communication channel.
391+
*/
392+
public static final AttributeKey<String> AWS_SNS_TOPIC_ARN = stringKey("aws.sns.topic.arn");
393+
394+
/**
395+
* The URL of the AWS SQS Queue. It's a unique identifier for a queue in Amazon Simple Queue
396+
* Service (SQS) and is used to access the queue and perform actions on it.
397+
*/
398+
public static final AttributeKey<String> AWS_SQS_QUEUE_URL = stringKey("aws.sqs.queue.url");
399+
400+
/** The ARN of the AWS Step Functions Activity. */
401+
public static final AttributeKey<String> AWS_STEP_FUNCTIONS_ACTIVITY_ARN =
402+
stringKey("aws.step_functions.activity.arn");
403+
404+
/** The ARN of the AWS Step Functions State Machine. */
405+
public static final AttributeKey<String> AWS_STEP_FUNCTIONS_STATE_MACHINE_ARN =
406+
stringKey("aws.step_functions.state_machine.arn");
407+
344408
// Enum definitions
409+
345410
/** Values for {@link #AWS_ECS_LAUNCHTYPE}. */
346411
public static final class AwsEcsLaunchtypeIncubatingValues {
347412
/** ec2. */

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public final class AzureIncubatingAttributes {
5858
longKey("azure.cosmosdb.response.sub_status_code");
5959

6060
// Enum definitions
61+
6162
/** Values for {@link #AZURE_COSMOSDB_CONNECTION_MODE}. */
6263
public static final class AzureCosmosdbConnectionModeIncubatingValues {
6364
/** Gateway (HTTP) connection. */

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public final class CassandraIncubatingAttributes {
4545
longKey("cassandra.speculative_execution.count");
4646

4747
// Enum definitions
48+
4849
/** Values for {@link #CASSANDRA_CONSISTENCY_LEVEL}. */
4950
public static final class CassandraConsistencyLevelIncubatingValues {
5051
/** all. */

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

Lines changed: 63 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,37 @@ 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+
88+
/** Values for {@link #CICD_PIPELINE_ACTION_NAME}. */
89+
public static final class CicdPipelineActionNameIncubatingValues {
90+
/** The pipeline run is executing a build. */
91+
public static final String BUILD = "BUILD";
92+
93+
/** The pipeline run is executing. */
94+
public static final String RUN = "RUN";
95+
96+
/** The pipeline run is executing a sync. */
97+
public static final String SYNC = "SYNC";
98+
99+
private CicdPipelineActionNameIncubatingValues() {}
100+
}
101+
67102
/** Values for {@link #CICD_PIPELINE_RESULT}. */
68103
public static final class CicdPipelineResultIncubatingValues {
69104
/** The pipeline run finished successfully. */
@@ -114,6 +149,34 @@ public static final class CicdPipelineRunStateIncubatingValues {
114149
private CicdPipelineRunStateIncubatingValues() {}
115150
}
116151

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

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ public final class CloudIncubatingAttributes {
4040
public static final AttributeKey<String> CLOUD_PROVIDER = stringKey("cloud.provider");
4141

4242
/**
43-
* The geographical region the resource is running.
43+
* The geographical region within a cloud provider. When associated with a resource, this
44+
* attribute specifies the region where the resource operates. When calling services or APIs
45+
* deployed on a cloud, this attribute identifies the region where the called destination is
46+
* deployed.
4447
*
4548
* <p>Notes:
4649
*
@@ -89,6 +92,7 @@ public final class CloudIncubatingAttributes {
8992
public static final AttributeKey<String> CLOUD_RESOURCE_ID = stringKey("cloud.resource_id");
9093

9194
// Enum definitions
95+
9296
/** Values for {@link #CLOUD_PLATFORM}. */
9397
public static final class CloudPlatformIncubatingValues {
9498
/** Alibaba Cloud Elastic Compute Service */

0 commit comments

Comments
 (0)