opentelemetry-specification
opentelemetry-specification copied to clipboard
Define configuration for enabling sqlcommenter
It would be great if there was a convention for how to enable sqlcommenter
for those OTel libraries that have it implemented.
At the moment I see some Python and JS instrumentation libraries do this with a boolean, though the naming is inconsistent. Examples:
-
SQLAlchemy instrumentation uses
enable_commenter
-
Django ORM instrumentation uses
is_sql_commentor_enabled
-
pg instrumentation uses
addSqlCommenterCommentToQueries
If instead we had OTEL_SQLCOMMENTER_ENABLED
(or similar) then this could be adopted by existing libraries and more libraries as sqlcommenter
is implemented. It could also be exposed as an environment variable used in auto-instrumentation and manual instrumentation.