Skip to content

Commit 8d2ab74

Browse files
trasklmolkova
andauthored
Mark database semconv as release candidate (#1101)
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
1 parent f9cf635 commit 8d2ab74

19 files changed

+207
-115
lines changed

.chloggen/1101.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use this changelog template to create an entry for release notes.
2+
#
3+
# If your change doesn't affect end users you should instead start
4+
# your pull request title with [chore] or use the "Skip Changelog" label.
5+
6+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
7+
change_type: enhancement
8+
9+
# The name of the area of concern in the attributes-registry, (e.g. http, cloud, db)
10+
component: db
11+
12+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
13+
note: Mark database semantic conventions as release candidate
14+
15+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
16+
# The values here must be integers.
17+
issues: [ 1101 ]
18+
19+
# (Optional) One or more lines of additional information to render under the primary note.
20+
# These lines will be padded with 2 spaces and then inserted directly into the document.
21+
# Use pipe (|) for multiline entries.
22+
subtext:

docs/attributes-registry/db.md

+64-56
Large diffs are not rendered by default.

docs/database/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ path_base_for_github_subdir:
77

88
# Semantic Conventions for Database Calls and Systems
99

10-
**Status**: [Experimental][DocumentStatus]
10+
**Status**: [Mixed][DocumentStatus]
1111

1212
This document defines semantic conventions for database client spans as well as
1313
database metrics and logs.

docs/database/cassandra.md

+6
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,25 @@ The Semantic Conventions for [Cassandra](https://cassandra.apache.org/) extend a
4343
**[1]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
4444
If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix.
4545
For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured.
46+
This attribute has stability level RELEASE CANDIDATE.
4647

4748
**[2]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name found in the query.
4849

4950
**[3]:** If a database system has multiple namespace components, they SHOULD be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces SHOULD NOT be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid.
5051
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
5152
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
53+
This attribute has stability level RELEASE CANDIDATE.
5254

5355
**[4]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
5456
If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query.
5557
For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable.
58+
This attribute has stability level RELEASE CANDIDATE.
5659

5760
**[5]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query.
5861

5962
**[6]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
6063
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
64+
This attribute has stability level RELEASE CANDIDATE.
6165

6266
**[7]:** If the operation failed and status code is available.
6367

@@ -74,6 +78,7 @@ Instrumentations SHOULD document how `error.type` is populated.
7478
**[12]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
7579
For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
7680
Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
81+
This attribute has stability level RELEASE CANDIDATE.
7782

7883
**[13]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
7984

@@ -83,6 +88,7 @@ Even though parameterized query text can potentially have sensitive data, by usi
8388

8489
**[16]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders.
8590
If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index.
91+
This attribute has stability level RELEASE CANDIDATE.
8692

8793

8894

docs/database/cosmosdb.md

+3
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ additional values when introducing new operations.
175175

176176
**[5]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
177177
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
178+
This attribute has stability level RELEASE CANDIDATE.
178179

179180
**[6]:** The `error.type` SHOULD match the `db.response.status_code` returned by the database or the client library, or the canonical name of exception that occurred.
180181
When using canonical exception type name, instrumentation SHOULD do the best effort to report the most relevant type. For example, if the original exception is wrapped into a generic one, the original exception SHOULD be preferred.
@@ -189,6 +190,7 @@ Instrumentations SHOULD document how `error.type` is populated.
189190
**[10]:** For sanitization see [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
190191
For batch operations, if the individual operations are known to have the same query text then that query text SHOULD be used, otherwise all of the individual query texts SHOULD be concatenated with separator `; ` or some other database system specific separator if more applicable.
191192
Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.
193+
This attribute has stability level RELEASE CANDIDATE.
192194

193195
**[11]:** SHOULD be collected by default only if there is sanitization that excludes sensitive information. See [Sanitization of `db.query.text`](../../docs/database/database-spans.md#sanitization-of-dbquerytext).
194196

@@ -200,6 +202,7 @@ Even though parameterized query text can potentially have sensitive data, by usi
200202

201203
**[14]:** Query parameters should only be captured when `db.query.text` is parameterized with placeholders.
202204
If a parameter has no name and instead is referenced only by index, then `<key>` SHOULD be the 0-based index.
205+
This attribute has stability level RELEASE CANDIDATE.
203206

204207

205208

docs/database/couchdb.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ The Semantic Conventions for [CouchDB](https://couchdb.apache.org/) extend and o
3535

3636
**[3]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
3737
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
38+
This attribute has stability level RELEASE CANDIDATE.
3839

3940
**[4]:** If response was received and the HTTP response code is available.
4041

docs/database/database-metrics.md

+35-31
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,25 @@ linkTitle: Metrics
44

55
# Semantic Conventions for Database Metrics
66

7-
**Status**: [Experimental][DocumentStatus]
8-
9-
The conventions described in this section are specific to SQL and NoSQL clients.
10-
11-
**Disclaimer:** These are initial database client metric instruments
12-
and attributes but more may be added in the future.
7+
**Status**: [Mixed][DocumentStatus]
138

149
<!-- Re-generate TOC with `markdown-toc --no-first-h1 -i` -->
1510

1611
<!-- toc -->
1712

1813
- [Database operation](#database-operation)
1914
- [Metric: `db.client.operation.duration`](#metric-dbclientoperationduration)
20-
- [Connection pools](#connection-pools)
21-
- [Metric: `db.client.connection.count`](#metric-dbclientconnectioncount)
22-
- [Metric: `db.client.connection.idle.max`](#metric-dbclientconnectionidlemax)
23-
- [Metric: `db.client.connection.idle.min`](#metric-dbclientconnectionidlemin)
24-
- [Metric: `db.client.connection.max`](#metric-dbclientconnectionmax)
25-
- [Metric: `db.client.connection.pending_requests`](#metric-dbclientconnectionpending_requests)
26-
- [Metric: `db.client.connection.timeouts`](#metric-dbclientconnectiontimeouts)
27-
- [Metric: `db.client.connection.create_time`](#metric-dbclientconnectioncreate_time)
28-
- [Metric: `db.client.connection.wait_time`](#metric-dbclientconnectionwait_time)
29-
- [Metric: `db.client.connection.use_time`](#metric-dbclientconnectionuse_time)
15+
- [Experimental](#experimental)
16+
- [Connection pools](#connection-pools)
17+
- [Metric: `db.client.connection.count`](#metric-dbclientconnectioncount)
18+
- [Metric: `db.client.connection.idle.max`](#metric-dbclientconnectionidlemax)
19+
- [Metric: `db.client.connection.idle.min`](#metric-dbclientconnectionidlemin)
20+
- [Metric: `db.client.connection.max`](#metric-dbclientconnectionmax)
21+
- [Metric: `db.client.connection.pending_requests`](#metric-dbclientconnectionpending_requests)
22+
- [Metric: `db.client.connection.timeouts`](#metric-dbclientconnectiontimeouts)
23+
- [Metric: `db.client.connection.create_time`](#metric-dbclientconnectioncreate_time)
24+
- [Metric: `db.client.connection.wait_time`](#metric-dbclientconnectionwait_time)
25+
- [Metric: `db.client.connection.use_time`](#metric-dbclientconnectionuse_time)
3026

3127
<!-- tocstop -->
3228

@@ -60,7 +56,7 @@ and attributes but more may be added in the future.
6056

6157
### Metric: `db.client.operation.duration`
6258

63-
**Status**: [Experimental][DocumentStatus]
59+
**Status**: [Release Candidate][DocumentStatus]
6460

6561
This metric is [required][MetricRequired].
6662

@@ -99,25 +95,30 @@ of `[ 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 5, 10 ]`.
9995
| [`server.address`](/docs/attributes-registry/server.md) | string | Name of the database host. [13] | `example.com`; `10.1.2.80`; `/tmp/my.sock` | `Recommended` | ![Stable](https://img.shields.io/badge/-stable-lightgreen) |
10096

10197
**[1]:** The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system` is set to `postgresql` based on the instrumentation's best knowledge.
98+
This attribute has stability level RELEASE CANDIDATE.
10299

103100
**[2]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
104101
If the collection name is parsed from the query text, it SHOULD be the first collection name found in the query and it SHOULD match the value provided in the query text including any schema and database name prefix.
105102
For batch operations, if the individual operations are known to have the same collection name then that collection name SHOULD be used, otherwise `db.collection.name` SHOULD NOT be captured.
103+
This attribute has stability level RELEASE CANDIDATE.
106104

107105
**[3]:** If readily available. The collection name MAY be parsed from the query text, in which case it SHOULD be the first collection name in the query.
108106

109107
**[4]:** If a database system has multiple namespace components, they SHOULD be concatenated (potentially using database system specific conventions) from most general to most specific namespace component, and more specific namespaces SHOULD NOT be captured without the more general namespaces, to ensure that "startswith" queries for the more general namespaces will be valid.
110108
Semantic conventions for individual database systems SHOULD document what `db.namespace` means in the context of that system.
111109
It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
110+
This attribute has stability level RELEASE CANDIDATE.
112111

113112
**[5]:** It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization.
114113
If the operation name is parsed from the query text, it SHOULD be the first operation name found in the query.
115114
For batch operations, if the individual operations are known to have the same operation name then that operation name SHOULD be used prepended by `BATCH `, otherwise `db.operation.name` SHOULD be `BATCH` or some other database system specific term if more applicable.
115+
This attribute has stability level RELEASE CANDIDATE.
116116

117117
**[6]:** If readily available. The operation name MAY be parsed from the query text, in which case it SHOULD be the first operation name found in the query.
118118

119119
**[7]:** The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.
120120
Semantic conventions for individual database systems SHOULD document what `db.response.status_code` means in the context of that system.
121+
This attribute has stability level RELEASE CANDIDATE.
121122

122123
**[8]:** If the operation failed and status code is available.
123124

@@ -166,20 +167,20 @@ If a database operation involved multiple network calls (for example retries), t
166167
| `instantdb` | InstantDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
167168
| `interbase` | InterBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
168169
| `intersystems_cache` | InterSystems Caché | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
169-
| `mariadb` | MariaDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
170+
| `mariadb` | MariaDB (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
170171
| `maxdb` | SAP MaxDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
171172
| `memcached` | Memcached | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
172173
| `mongodb` | MongoDB | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
173-
| `mssql` | Microsoft SQL Server | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
174-
| `mysql` | MySQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
174+
| `mssql` | Microsoft SQL Server (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
175+
| `mysql` | MySQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
175176
| `neo4j` | Neo4j | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
176177
| `netezza` | Netezza | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
177178
| `opensearch` | OpenSearch | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
178179
| `oracle` | Oracle Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
179180
| `other_sql` | Some other SQL database. Fallback only. See notes. | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
180181
| `pervasive` | Pervasive PSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
181182
| `pointbase` | PointBase | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
182-
| `postgresql` | PostgreSQL | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
183+
| `postgresql` | PostgreSQL (This value has stability level RELEASE CANDIDATE) | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
183184
| `progress` | Progress Database | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
184185
| `redis` | Redis | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
185186
| `redshift` | Amazon Redshift | ![Experimental](https://img.shields.io/badge/-experimental-blue) |
@@ -204,11 +205,13 @@ If a database operation involved multiple network calls (for example retries), t
204205
<!-- END AUTOGENERATED TEXT -->
205206
<!-- endsemconv -->
206207

207-
## Connection pools
208+
## Experimental
209+
210+
### Connection pools
208211

209212
The following metric instruments describe database client connection pool operations.
210213

211-
### Metric: `db.client.connection.count`
214+
#### Metric: `db.client.connection.count`
212215

213216
This metric is [required][MetricRequired].
214217

@@ -241,7 +244,8 @@ This metric is [required][MetricRequired].
241244
<!-- prettier-ignore-end -->
242245
<!-- END AUTOGENERATED TEXT -->
243246
<!-- endsemconv -->
244-
### Metric: `db.client.connection.idle.max`
247+
248+
#### Metric: `db.client.connection.idle.max`
245249

246250
This metric is [recommended][MetricRecommended].
247251

@@ -266,7 +270,7 @@ This metric is [recommended][MetricRecommended].
266270
<!-- END AUTOGENERATED TEXT -->
267271
<!-- endsemconv -->
268272

269-
### Metric: `db.client.connection.idle.min`
273+
#### Metric: `db.client.connection.idle.min`
270274

271275
This metric is [recommended][MetricRecommended].
272276

@@ -291,7 +295,7 @@ This metric is [recommended][MetricRecommended].
291295
<!-- END AUTOGENERATED TEXT -->
292296
<!-- endsemconv -->
293297

294-
### Metric: `db.client.connection.max`
298+
#### Metric: `db.client.connection.max`
295299

296300
This metric is [recommended][MetricRecommended].
297301

@@ -316,7 +320,7 @@ This metric is [recommended][MetricRecommended].
316320
<!-- END AUTOGENERATED TEXT -->
317321
<!-- endsemconv -->
318322

319-
### Metric: `db.client.connection.pending_requests`
323+
#### Metric: `db.client.connection.pending_requests`
320324

321325
This metric is [recommended][MetricRecommended].
322326

@@ -341,7 +345,7 @@ This metric is [recommended][MetricRecommended].
341345
<!-- END AUTOGENERATED TEXT -->
342346
<!-- endsemconv -->
343347

344-
### Metric: `db.client.connection.timeouts`
348+
#### Metric: `db.client.connection.timeouts`
345349

346350
This metric is [recommended][MetricRecommended].
347351

@@ -366,7 +370,7 @@ This metric is [recommended][MetricRecommended].
366370
<!-- END AUTOGENERATED TEXT -->
367371
<!-- endsemconv -->
368372

369-
### Metric: `db.client.connection.create_time`
373+
#### Metric: `db.client.connection.create_time`
370374

371375
This metric is [recommended][MetricRecommended].
372376

@@ -391,7 +395,7 @@ This metric is [recommended][MetricRecommended].
391395
<!-- END AUTOGENERATED TEXT -->
392396
<!-- endsemconv -->
393397

394-
### Metric: `db.client.connection.wait_time`
398+
#### Metric: `db.client.connection.wait_time`
395399

396400
This metric is [recommended][MetricRecommended].
397401

@@ -416,7 +420,7 @@ This metric is [recommended][MetricRecommended].
416420
<!-- END AUTOGENERATED TEXT -->
417421
<!-- endsemconv -->
418422

419-
### Metric: `db.client.connection.use_time`
423+
#### Metric: `db.client.connection.use_time`
420424

421425
This metric is [recommended][MetricRecommended].
422426

0 commit comments

Comments
 (0)