semantic-conventions
semantic-conventions copied to clipboard
Introduce common configuration option for sanitisation of `db.statement`.
What are you trying to achieve?
Standardise the configuration for the sanitisation of db.statement.
With https://github.com/open-telemetry/opentelemetry-specification/issues/3104 the default for the collection of db.statement is conditional on whether sanitisation is configured/available or not.
While I fully agree with the initiative it has a knock on effect that each LANG and INSTRUMENTATION will start using their own configuration mechanisms to enable the collection of db.statement.
This leads to a fragmented feature set and quite a large configuration burden to our users.
What did you expect to see?
A single OTEL_* environment variable that users can set and that instrumentation can pick up.
OTEL_INSTRUMENTATION_DB_STATEMENT
omitdefault value, discards or prevents the collection ofdb.statementsanitise- instruct instrumentation to sanitise any captured
db.statement - if no sanitisation mechanism exist for the specific language instrumentation will fall back to
omit
- instruct instrumentation to sanitise any captured
rawcollect any captureddb.statementraw without any sanitisation.
Agents in specific languages could further more listen to a more restricted:
OTEL_{LANGUAGE}_INSTRUMENTATION_DB_STATEMENT environment variable that takes precedence over OTEL_INSTRUMENTATION_DB_STATEMENT
To isolate the choice further if so required.
Additional context.
- https://github.com/open-telemetry/opentelemetry-specification/issues/3104
related to #1483