Skip to content

Commit 94bf04a

Browse files
Update comment
1 parent 880c0f7 commit 94bf04a

File tree

1 file changed

+5
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql

1 file changed

+5
-2
lines changed

instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,11 @@ def cursor(self, *args, **kwargs):
240240

241241
# If a mysql-connector cursor was created with prepared=True,
242242
# then MySQL statements will be prepared and executed natively.
243-
# 1:1 sqlcomment and span correlation in instrumentation would
244-
# break, so sqlcomment is not supported for this use case.
243+
# Adding sqlcommenting would introduce a severe performance
244+
# penalty by repeating `Prepare` of statements by mysql-connector
245+
# that are made unique by traceparent in sqlcomment. Therefore,
246+
# sqlcomment is not supported for this use case. It is not an
247+
# issue if prepared=False.
245248
# This is here because wrapped cursor is created when application
246249
# side creates cursor. After that, the instrumentor knows what
247250
# kind of cursor was initialized.

0 commit comments

Comments
 (0)