Skip to content

Commit c9d6dee

Browse files
Add comment
1 parent 4002f7d commit c9d6dee

File tree

1 file changed

+3
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,9 @@ def cursor(self, *args, **kwargs):
414414
# then MySQL statements will be prepared and executed natively.
415415
# 1:1 sqlcomment and span correlation in instrumentation will
416416
# break, so sqlcomment is not supported for this use case.
417-
# This is here because a client app can use multiple cursors
418-
# and to not check cursor with every traced request.
417+
# This is here because wrapped cursor is not created until
418+
# application side creates cursor and it's only then that
419+
# the instrumentor knows what kind of cursor it is.
419420
is_prepared = False
420421
if (
421422
db_api_integration.database_system == "mysql"

0 commit comments

Comments
 (0)