You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/database/mariadb.md
+25-15Lines changed: 25 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,13 +38,15 @@ Spans representing calls to MariaDB adhere to the general [Semantic Conventions
38
38
|[`db.response.status_code`](/docs/attributes-registry/db.md)| string |[Maria DB error code](https://mariadb.com/kb/en/mariadb-error-code-reference/) represented as a string. [2]|`1008`; `3058`|`Conditionally Required` If response has ended with warning or an error. ||
39
39
|[`error.type`](/docs/attributes-registry/error.md)| string | Describes a class of error the operation ended with. [3]|`timeout`; `java.net.UnknownHostException`; `server_certificate_invalid`; `500`|`Conditionally Required` If and only if the operation failed. ||
40
40
|[`server.port`](/docs/attributes-registry/server.md)| int | Server port number. [4]|`80`; `8080`; `443`|`Conditionally Required`[5]||
41
-
|[`db.operation.batch.size`](/docs/attributes-registry/db.md)| int | The number of queries included in a batch operation. [6]|`2`; `3`; `4`|`Recommended`||
42
-
|[`db.query.summary`](/docs/attributes-registry/db.md)| string | Low cardinality representation of a database query text. [7]|`SELECT wuser_table`; `INSERT shipping_details SELECT orders`; `get user by id`|`Recommended`[8]||
43
-
|[`db.query.text`](/docs/attributes-registry/db.md)| string | The database query being executed. [9]|`SELECT * FROM wuser_table where username = ?`; `SET mykey ?`|`Recommended`[10]||
41
+
|[`db.collection.name`](/docs/attributes-registry/db.md)| string | The name of a collection (table, container) within the database. [6]|`public.users`; `customers`|`Recommended`[7]||
42
+
|[`db.operation.batch.size`](/docs/attributes-registry/db.md)| int | The number of queries included in a batch operation. [8]|`2`; `3`; `4`|`Recommended`||
43
+
|[`db.operation.name`](/docs/attributes-registry/db.md)| string | The name of the operation or command being executed. [9]|`EXECUTE`; `INSERT`|`Recommended`[10]||
44
+
|[`db.query.summary`](/docs/attributes-registry/db.md)| string | Low cardinality representation of a database query text. [11]|`SELECT wuser_table`; `INSERT shipping_details SELECT orders`; `get user by id`|`Recommended`[12]||
45
+
|[`db.query.text`](/docs/attributes-registry/db.md)| string | The database query being executed. [13]|`SELECT * FROM wuser_table where username = ?`; `SET mykey ?`|`Recommended`[14]||
44
46
|[`db.response.returned_rows`](/docs/attributes-registry/db.md)| int | Number of rows returned by the operation. |`10`; `30`; `1000`|`Recommended`||
45
-
|[`db.stored_procedure.name`](/docs/attributes-registry/db.md)| string | The name of a stored procedure within the database. [11]|`GetCustomer`|`Recommended`[12]||
46
-
|[`server.address`](/docs/attributes-registry/server.md)| string | Name of the database host. [13]|`example.com`; `10.1.2.80`; `/tmp/my.sock`|`Recommended`||
47
-
|[`db.query.parameter.<key>`](/docs/attributes-registry/db.md)| string | A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value. [14]|`someval`; `55`|`Opt-In`||
47
+
|[`db.stored_procedure.name`](/docs/attributes-registry/db.md)| string | The name of a stored procedure within the database. [15]|`GetCustomer`|`Recommended`[16]||
48
+
|[`server.address`](/docs/attributes-registry/server.md)| string | Name of the database host. [17]|`example.com`; `10.1.2.80`; `/tmp/my.sock`|`Recommended`||
49
+
|[`db.query.parameter.<key>`](/docs/attributes-registry/db.md)| string | A database query parameter, with `<key>` being the parameter name, and the attribute value being a string representation of the parameter value. [18]|`someval`; `55`|`Opt-In`||
48
50
49
51
**[1]`db.namespace`:** A connection's currently associated database may change during its lifetime, e.g. from executing `USE <database>`.
50
52
@@ -68,31 +70,39 @@ Instrumentations SHOULD document how `error.type` is populated.
68
70
69
71
**[5]`server.port`:** If using a port other than the default port for this DBMS and if `server.address` is set.
70
72
71
-
**[6]`db.operation.batch.size`:**Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
73
+
**[6]`db.collection.name`:**The collection name SHOULD NOT be extracted from `db.query.text`.
72
74
73
-
**[7]`db.query.summary`:**`db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries.
75
+
**[7]`db.collection.name`:** If the operation is executed via a higher-level API that does not support multiple collection names.
76
+
77
+
**[8]`db.operation.batch.size`:** Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` SHOULD never be `1`.
78
+
79
+
**[9]`db.operation.name`:** The operation name SHOULD NOT be extracted from `db.query.text`.
80
+
81
+
**[10]`db.operation.name`:** If the operation is executed via a higher-level API that does not support multiple operation names.
82
+
83
+
**[11]`db.query.summary`:**`db.query.summary` provides static summary of the query text. It describes a class of database queries and is useful as a grouping key, especially when analyzing telemetry for database calls involving complex queries.
74
84
Summary may be available to the instrumentation through instrumentation hooks or other means. If it is not available, instrumentations that support query parsing SHOULD generate a summary following [Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query-text) section.
75
85
76
-
**[8]`db.query.summary`:** if readily available or if instrumentation supports query summarization.
86
+
**[12]`db.query.summary`:** if readily available or if instrumentation supports query summarization.
77
87
78
-
**[9]`db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
88
+
**[13]`db.query.text`:** For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
79
89
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.
80
90
Parameterized query text SHOULD NOT be sanitized. 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
91
82
-
**[10]`db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
92
+
**[14]`db.query.text`:** Non-parameterized query text SHOULD NOT be collected by default unless there is sanitization that excludes sensitive data, e.g. by redacting all literal values present in the query text. See [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).
83
93
Parameterized query text SHOULD be collected by default (the query parameter values themselves are opt-in, see [`db.query.parameter.<key>`](/docs/attributes-registry/db.md)).
84
94
85
-
**[11]`db.stored_procedure.name`:** It is RECOMMENDED to capture the value as provided by the application
95
+
**[15]`db.stored_procedure.name`:** It is RECOMMENDED to capture the value as provided by the application
86
96
without attempting to do any case normalization.
87
97
88
98
For batch operations, if the individual operations are known to have the same
89
99
stored procedure name then that stored procedure name SHOULD be used.
90
100
91
-
**[12]`db.stored_procedure.name`:** If operation applies to a specific stored procedure.
101
+
**[16]`db.stored_procedure.name`:** If operation applies to a specific stored procedure.
92
102
93
-
**[13]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
103
+
**[17]`server.address`:** When observed from the client side, and when communicating through an intermediary, `server.address` SHOULD represent the server address behind any intermediaries, for example proxies, if it's available.
94
104
95
-
**[14]`db.query.parameter.<key>`:** If a query parameter has no name and instead is referenced only by index,
105
+
**[18]`db.query.parameter.<key>`:** If a query parameter has no name and instead is referenced only by index,
0 commit comments