From da13a718393200b539888d3c97c342c4dd4eabe7 Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Thu, 28 Nov 2024 12:21:01 -0800 Subject: [PATCH] Update doc --- .../src/opentelemetry/instrumentation/mysql/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/__init__.py b/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/__init__.py index 7c154f6a72..208a399cc9 100644 --- a/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/__init__.py @@ -63,6 +63,9 @@ the query will get appended with some configurable tags like "INSERT INTO test (testField) VALUES (123) /*tag=value*/;" +Note that sqlcommenter for mysql-connector is not supported if cursor is initialized with `prepared=True`, which would natively prepare and execute MySQL statements. Adding sqlcommenting would introduce a severe performance penalty by repeating `Prepare` of statements by mysql-connector that are made unique by traceparent in sqlcomment. Therefore, sqlcommenter is not supported for this use case. + + SQLCommenter Configurations *************************** We can configure the tags to be appended to the sqlquery log by adding configuration inside commenter_options(default:{}) keyword