88import static io .opentelemetry .api .common .AttributeKey .booleanKey ;
99import static io .opentelemetry .api .common .AttributeKey .doubleKey ;
1010import static io .opentelemetry .api .common .AttributeKey .longKey ;
11+ import static io .opentelemetry .api .common .AttributeKey .stringArrayKey ;
1112import static io .opentelemetry .api .common .AttributeKey .stringKey ;
1213import static io .opentelemetry .semconv .AttributeKeyTemplate .stringKeyTemplate ;
1314
1415import io .opentelemetry .api .common .AttributeKey ;
1516import 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" ;
0 commit comments