Skip to content

Commit de325e6

Browse files
authored
Update to semantic conventions 1.29.0 and weaver 0.12.0 (#118)
* Update to semantic conventions 1.29.0 and weaver 0.12.0 * workaround
1 parent b7e599c commit de325e6

26 files changed

+710
-103
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.28.0"
14+
var semanticConventionsVersion = "1.29.0"
1515
val schemaUrlVersions = listOf(
1616
semanticConventionsVersion,
17+
"1.28.0",
1718
"1.27.0",
1819
"1.26.0",
1920
"1.25.0",
@@ -55,7 +56,7 @@ nexusPublishing {
5556
}
5657

5758
// start - define tasks to download, unzip, and generate from opentelemetry/semantic-conventions
58-
var generatorVersion = "v0.9.1"
59+
var generatorVersion = "v0.12.0"
5960
val semanticConventionsRepoZip = "https://github.com/open-telemetry/semantic-conventions/archive/v${semanticConventionsVersion}.zip"
6061
val schemaUrl = "https://opentelemetry.io/schemas/$semanticConventionsVersion"
6162

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) need to disable html validation until next semconv release
80+
// see https://github.com/open-telemetry/semantic-conventions/pull/1664
81+
addBooleanOption("Xdoclint:all,-missing,-html", true)
8082
}
8183
}
8284

buildscripts/checkstyle.xml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,20 +138,28 @@
138138
<property name="tokens" value="VARIABLE_DEF"/>
139139
<property name="allowSamelineMultipleAnnotations" value="true"/>
140140
</module>
141-
<module name="NonEmptyAtclauseDescription"/>
142-
<module name="JavadocTagContinuationIndentation"/>
141+
<!-- TODO (trask) commented out until next semconv release,
142+
see https://github.com/open-telemetry/semantic-conventions/pull/1664 -->
143+
<!--module name="NonEmptyAtclauseDescription"/-->
144+
<!-- TODO (trask) commented out until next semconv release,
145+
see https://github.com/open-telemetry/semantic-conventions/pull/1664 -->
146+
<!--module name="JavadocTagContinuationIndentation"/-->
143147
<module name="SummaryJavadoc">
144148
<property name="forbiddenSummaryFragments"
145149
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
146150
</module>
147-
<module name="JavadocParagraph">
151+
<!-- TODO (trask) commented out until next semconv release,
152+
see https://github.com/open-telemetry/semantic-conventions/pull/1664 -->
153+
<!--module name="JavadocParagraph">
148154
<property name="allowNewlineParagraph" value="false"/>
149-
</module>
150-
<module name="AtclauseOrder">
155+
</module-->
156+
<!-- TODO (trask) commented out until next semconv release,
157+
see https://github.com/open-telemetry/semantic-conventions/pull/1664 -->
158+
<!--module name="AtclauseOrder">
151159
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
152160
<property name="target"
153161
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
154-
</module>
162+
</module-->
155163
<module name="JavadocMethod">
156164
<property name="scope" value="public"/>
157165
<property name="allowMissingParamTags" value="true"/>
@@ -170,10 +178,12 @@
170178
<message key="name.invalidPattern"
171179
value="Method name ''{0}'' must match pattern ''{1}''."/>
172180
</module>
173-
<module name="SingleLineJavadoc">
181+
<!-- TODO (trask) commented out until next semconv release,
182+
see https://github.com/open-telemetry/semantic-conventions/pull/1664 -->
183+
<!--module name="SingleLineJavadoc"-->
174184
<!-- <!-\- Wrong interpretation of the style guide; -\-> -->
175185
<!-- <property name="ignoreInlineTags" value="false"/ -->
176-
</module>
186+
<!--/module-->
177187
<module name="EmptyCatchBlock">
178188
<property name="exceptionVariableName" value="expected"/>
179189
</module>

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,6 @@ public final class AwsIncubatingAttributes {
232232
* href="https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html">copy-object
233233
* operation within the S3 API</a>. This applies in particular to the following operations:
234234
*
235-
* <p>
236-
*
237235
* <ul>
238236
* <li><a
239237
* href="https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html">copy-object</a>
@@ -266,8 +264,6 @@ public final class AwsIncubatingAttributes {
266264
* require the object key as a mandatory parameter. This applies in particular to the following
267265
* operations:
268266
*
269-
* <p>
270-
*
271267
* <ul>
272268
* <li><a
273269
* href="https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html">copy-object</a>
@@ -326,8 +322,6 @@ public final class AwsIncubatingAttributes {
326322
* href="https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html">S3 API</a> multipart
327323
* operations. This applies in particular to the following operations:
328324
*
329-
* <p>
330-
*
331325
* <ul>
332326
* <li><a
333327
* href="https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html">abort-multipart-upload</a>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public final class CicdIncubatingAttributes {
2121

2222
/**
2323
* The human readable name of a task within a pipeline. Task here most closely aligns with a <a
24-
* href="https://en.wikipedia.org/wiki/Pipeline_(computing)">computing process</a> in a pipeline.
24+
* href="https://wikipedia.org/wiki/Pipeline_(computing)">computing process</a> in a pipeline.
2525
* Other terms for tasks include commands, steps, and procedures.
2626
*/
2727
public static final AttributeKey<String> CICD_PIPELINE_TASK_NAME =
@@ -32,8 +32,8 @@ public final class CicdIncubatingAttributes {
3232
stringKey("cicd.pipeline.task.run.id");
3333

3434
/**
35-
* The <a href="https://en.wikipedia.org/wiki/URL">URL</a> of the pipeline run providing the
36-
* complete address in order to locate and identify the pipeline run.
35+
* The <a href="https://wikipedia.org/wiki/URL">URL</a> of the pipeline run providing the complete
36+
* address in order to locate and identify the pipeline run.
3737
*/
3838
public static final AttributeKey<String> CICD_PIPELINE_TASK_RUN_URL_FULL =
3939
stringKey("cicd.pipeline.task.run.url.full");

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public final class CloudIncubatingAttributes {
6969
* <p>The exact value to use for {@code cloud.resource_id} depends on the cloud provider. The
7070
* following well-known definitions MUST be used if you set this attribute and they apply:
7171
*
72-
* <p>
73-
*
7472
* <ul>
7573
* <li><strong>AWS Lambda:</strong> The function <a
7674
* href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html">ARN</a>.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public final class CloudfoundryIncubatingAttributes {
3030
* <p>Notes:
3131
*
3232
* <p>CloudFoundry defines the {@code instance_id} in the <a
33-
* href="https://github.com/cloudfoundry/loggregator-api#v2-envelope">Loggegator v2 envelope</a>.
33+
* href="https://github.com/cloudfoundry/loggregator-api#v2-envelope">Loggregator v2 envelope</a>.
3434
* It is used for logs and metrics emitted by CloudFoundry. It is supposed to contain the
3535
* application instance index for applications deployed on the runtime.
3636
*

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

Lines changed: 116 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
import static io.opentelemetry.api.common.AttributeKey.booleanKey;
99
import static io.opentelemetry.api.common.AttributeKey.doubleKey;
1010
import static io.opentelemetry.api.common.AttributeKey.longKey;
11+
import static io.opentelemetry.api.common.AttributeKey.stringArrayKey;
1112
import static io.opentelemetry.api.common.AttributeKey.stringKey;
1213
import static io.opentelemetry.semconv.AttributeKeyTemplate.stringKeyTemplate;
1314

1415
import io.opentelemetry.api.common.AttributeKey;
1516
import io.opentelemetry.semconv.AttributeKeyTemplate;
17+
import java.util.List;
1618

1719
// DO NOT EDIT, this is an Auto-generated file from
1820
// buildscripts/templates/registry/incubating_java/IncubatingSemanticAttributes.java.j2
@@ -100,12 +102,15 @@ public final class DbIncubatingAttributes {
100102
* <p>Notes:
101103
*
102104
* <p>It is RECOMMENDED to capture the value as provided by the application without attempting to
103-
* do any case normalization. If the collection name is parsed from the query text, it SHOULD be
104-
* the first collection name found in the query and it SHOULD match the value provided in the
105-
* query text including any schema and database name prefix. For batch operations, if the
106-
* individual operations are known to have the same collection name then that collection name
107-
* SHOULD be used, otherwise {@code db.collection.name} SHOULD NOT be captured. This attribute has
108-
* stability level RELEASE CANDIDATE.
105+
* do any case normalization.
106+
*
107+
* <p>The collection name SHOULD NOT be extracted from {@code db.query.text}, unless the query
108+
* format is known to only ever have a single collection name present.
109+
*
110+
* <p>For batch operations, if the individual operations are known to have the same collection
111+
* name then that collection name SHOULD be used.
112+
*
113+
* <p>This attribute has stability level RELEASE CANDIDATE.
109114
*/
110115
public static final AttributeKey<String> DB_COLLECTION_NAME = stringKey("db.collection.name");
111116

@@ -127,6 +132,13 @@ public final class DbIncubatingAttributes {
127132
public static final AttributeKey<String> DB_COSMOSDB_CONNECTION_MODE =
128133
stringKey("db.cosmosdb.connection_mode");
129134

135+
/**
136+
* Account or request <a
137+
* href="https://learn.microsoft.com/azure/cosmos-db/consistency-levels">consistency level</a>.
138+
*/
139+
public static final AttributeKey<String> DB_COSMOSDB_CONSISTENCY_LEVEL =
140+
stringKey("db.cosmosdb.consistency_level");
141+
130142
/**
131143
* Deprecated, use {@code db.collection.name} instead.
132144
*
@@ -138,15 +150,36 @@ public final class DbIncubatingAttributes {
138150
public static final AttributeKey<String> DB_COSMOSDB_CONTAINER =
139151
stringKey("db.cosmosdb.container");
140152

141-
/** Cosmos DB Operation Type. */
153+
/**
154+
* Deprecated, no replacement at this time.
155+
*
156+
* <p>
157+
*
158+
* @deprecated No replacement at this time.
159+
*/
160+
@Deprecated
142161
public static final AttributeKey<String> DB_COSMOSDB_OPERATION_TYPE =
143162
stringKey("db.cosmosdb.operation_type");
144163

145-
/** RU consumed for that operation */
164+
/**
165+
* List of regions contacted during operation in the order that they were contacted. If there is
166+
* more than one region listed, it indicates that the operation was performed on multiple regions
167+
* i.e. cross-regional call.
168+
*
169+
* <p>Notes:
170+
*
171+
* <p>Region name matches the format of {@code displayName} in <a
172+
* href="https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location">Azure
173+
* Location API</a>
174+
*/
175+
public static final AttributeKey<List<String>> DB_COSMOSDB_REGIONS_CONTACTED =
176+
stringArrayKey("db.cosmosdb.regions_contacted");
177+
178+
/** Request units consumed for the operation. */
146179
public static final AttributeKey<Double> DB_COSMOSDB_REQUEST_CHARGE =
147180
doubleKey("db.cosmosdb.request_charge");
148181

149-
/** Request payload size in bytes */
182+
/** Request payload size in bytes. */
150183
public static final AttributeKey<Long> DB_COSMOSDB_REQUEST_CONTENT_LENGTH =
151184
longKey("db.cosmosdb.request_content_length");
152185

@@ -292,28 +325,61 @@ public final class DbIncubatingAttributes {
292325
* <p>Notes:
293326
*
294327
* <p>It is RECOMMENDED to capture the value as provided by the application without attempting to
295-
* do any case normalization. If the operation name is parsed from the query text, it SHOULD be
296-
* the first operation name found in the query. For batch operations, if the individual operations
297-
* are known to have the same operation name then that operation name SHOULD be used prepended by
298-
* {@code BATCH }, otherwise {@code db.operation.name} SHOULD be {@code BATCH} or some other
299-
* database system specific term if more applicable. This attribute has stability level RELEASE
300-
* CANDIDATE.
328+
* do any case normalization.
329+
*
330+
* <p>The operation name SHOULD NOT be extracted from {@code db.query.text}, unless the query
331+
* format is known to only ever have a single operation name present.
332+
*
333+
* <p>For batch operations, if the individual operations are known to have the same operation name
334+
* then that operation name SHOULD be used prepended by {@code BATCH }, otherwise {@code
335+
* db.operation.name} SHOULD be {@code BATCH} or some other database system specific term if more
336+
* applicable.
337+
*
338+
* <p>This attribute has stability level RELEASE CANDIDATE.
301339
*/
302340
public static final AttributeKey<String> DB_OPERATION_NAME = stringKey("db.operation.name");
303341

342+
/**
343+
* A database operation parameter, with {@code <key>} being the parameter name, and the attribute
344+
* value being a string representation of the parameter value.
345+
*
346+
* <p>Notes:
347+
*
348+
* <p>If a parameter has no name and instead is referenced only by index, then {@code <key>}
349+
* SHOULD be the 0-based index. If {@code db.query.text} is also captured, then {@code
350+
* db.operation.parameter.<key>} SHOULD match up with the parameterized placeholders present in
351+
* {@code db.query.text}. This attribute has stability level RELEASE CANDIDATE.
352+
*/
353+
public static final AttributeKeyTemplate<String> DB_OPERATION_PARAMETER =
354+
stringKeyTemplate("db.operation.parameter");
355+
304356
/**
305357
* A query parameter used in {@code db.query.text}, with {@code <key>} being the parameter name,
306358
* and the attribute value being a string representation of the parameter value.
307359
*
308-
* <p>Notes:
360+
* <p>
309361
*
310-
* <p>Query parameters should only be captured when {@code db.query.text} is parameterized with
311-
* placeholders. If a parameter has no name and instead is referenced only by index, then {@code
312-
* <key>} SHOULD be the 0-based index. This attribute has stability level RELEASE CANDIDATE.
362+
* @deprecated Replaced by {@code db.operation.parameter}.
313363
*/
364+
@Deprecated
314365
public static final AttributeKeyTemplate<String> DB_QUERY_PARAMETER =
315366
stringKeyTemplate("db.query.parameter");
316367

368+
/**
369+
* Low cardinality representation of a database query text.
370+
*
371+
* <p>Notes:
372+
*
373+
* <p>{@code db.query.summary} provides static summary of the query text. It describes a class of
374+
* database queries and is useful as a grouping key, especially when analyzing telemetry for
375+
* database calls involving complex queries. Summary may be available to the instrumentation
376+
* through instrumentation hooks or other means. If it is not available, instrumentations that
377+
* support query parsing SHOULD generate a summary following <a
378+
* href="../../docs/database/database-spans.md#generating-a-summary-of-the-query-text">Generating
379+
* query summary</a> section. This attribute has stability level RELEASE CANDIDATE.
380+
*/
381+
public static final AttributeKey<String> DB_QUERY_SUMMARY = stringKey("db.query.summary");
382+
317383
/**
318384
* The database query being executed.
319385
*
@@ -343,6 +409,10 @@ public final class DbIncubatingAttributes {
343409
public static final AttributeKey<Long> DB_REDIS_DATABASE_INDEX =
344410
longKey("db.redis.database_index");
345411

412+
/** Number of rows returned by the operation. */
413+
public static final AttributeKey<Long> DB_RESPONSE_RETURNED_ROWS =
414+
longKey("db.response.returned_rows");
415+
346416
/**
347417
* Database response status code.
348418
*
@@ -464,7 +534,7 @@ private DbClientConnectionsStateIncubatingValues() {}
464534

465535
/** Values for {@link #DB_COSMOSDB_CONNECTION_MODE}. */
466536
public static final class DbCosmosdbConnectionModeIncubatingValues {
467-
/** Gateway (HTTP) connections mode */
537+
/** Gateway (HTTP) connection. */
468538
public static final String GATEWAY = "gateway";
469539

470540
/** Direct connection. */
@@ -473,7 +543,32 @@ public static final class DbCosmosdbConnectionModeIncubatingValues {
473543
private DbCosmosdbConnectionModeIncubatingValues() {}
474544
}
475545

476-
/** Values for {@link #DB_COSMOSDB_OPERATION_TYPE}. */
546+
/** Values for {@link #DB_COSMOSDB_CONSISTENCY_LEVEL}. */
547+
public static final class DbCosmosdbConsistencyLevelIncubatingValues {
548+
/** strong. */
549+
public static final String STRONG = "Strong";
550+
551+
/** bounded_staleness. */
552+
public static final String BOUNDED_STALENESS = "BoundedStaleness";
553+
554+
/** session. */
555+
public static final String SESSION = "Session";
556+
557+
/** eventual. */
558+
public static final String EVENTUAL = "Eventual";
559+
560+
/** consistent_prefix. */
561+
public static final String CONSISTENT_PREFIX = "ConsistentPrefix";
562+
563+
private DbCosmosdbConsistencyLevelIncubatingValues() {}
564+
}
565+
566+
/**
567+
* Values for {@link #DB_COSMOSDB_OPERATION_TYPE}
568+
*
569+
* @deprecated No replacement at this time.
570+
*/
571+
@Deprecated
477572
public static final class DbCosmosdbOperationTypeIncubatingValues {
478573
/** batch. */
479574
public static final String BATCH = "batch";

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ public final class DeploymentIncubatingAttributes {
3535
* resource attributes. This implies that resources carrying the following attribute combinations
3636
* MUST be considered to be identifying the same service:
3737
*
38-
* <p>
39-
*
4038
* <ul>
4139
* <li>{@code service.name=frontend}, {@code deployment.environment.name=production}
4240
* <li>{@code service.name=frontend}, {@code deployment.environment.name=staging}.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ public final class ErrorIncubatingAttributes {
3636
* <p>If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status
3737
* codes), it's RECOMMENDED to:
3838
*
39-
* <p>
40-
*
4139
* <ul>
4240
* <li>Use a domain-specific attribute
4341
* <li>Set {@code error.type} to capture all errors, regardless of whether they are defined
4442
* within the domain-specific set or not.
4543
* </ul>
4644
*
45+
* <p>
46+
*
4747
* @deprecated deprecated in favor of stable {@link
4848
* io.opentelemetry.semconv.ErrorAttributes#ERROR_TYPE} attribute.
4949
*/

0 commit comments

Comments
 (0)