A database query parameter, with <key> being the parameter name, and the attribute value being a string representation of the parameter value.
Example
someval
Example
55
Note
If a query parameter has no name and instead is referenced only by index,
then <key>SHOULD be the 0-based index.
db.query.parameter.<key>SHOULD match
up with the parameterized placeholders present in db.query.text.
It is RECOMMENDED to capture the value as provided by the application
without attempting to do any case normalization or sanitization.
Instrumentations SHOULD NOT capture db.query.parameter.<key> by default
since values may contain PII or sensitive details.
Application operators are expected to enable specific keys depending
on their privacy and security considerations.
db.query.parameter.<key>SHOULD NOT be captured on batch operations.
Examples:
For a query SELECT * FROM users where username = %s with the parameter "jdoe",
the attribute db.query.parameter.0SHOULD be set to "jdoe".
For a query "SELECT * FROM users WHERE username = %(userName)s; with parameter
userName = "jdoe", the attribute db.query.parameter.userNameSHOULD be set to "jdoe".
This attribute is experimental and is subject to breaking changes in minor releases of @opentelemetry/semantic-conventions.
A database query parameter, with
<key>being the parameter name, and the attribute value being a string representation of the parameter value.Example
Example
Note
If a query parameter has no name and instead is referenced only by index, then
<key>SHOULD be the 0-based index.db.query.parameter.<key>SHOULD match up with the parameterized placeholders present indb.query.text.It is RECOMMENDED to capture the value as provided by the application without attempting to do any case normalization or sanitization.
Instrumentations SHOULD NOT capture
db.query.parameter.<key>by default since values may contain PII or sensitive details. Application operators are expected to enable specific keys depending on their privacy and security considerations.db.query.parameter.<key>SHOULD NOT be captured on batch operations.Examples:
SELECT * FROM users where username = %swith the parameter"jdoe", the attributedb.query.parameter.0SHOULD be set to"jdoe"."SELECT * FROM users WHERE username = %(userName)s;with parameteruserName = "jdoe", the attributedb.query.parameter.userNameSHOULD be set to"jdoe".This attribute is experimental and is subject to breaking changes in minor releases of
@opentelemetry/semantic-conventions.