Skip to content

Commit 4369a05

Browse files
committed
Add docstring for instrument_connection for mysql
1 parent 2ab903a commit 4369a05

File tree

1 file changed

+6
-0
lines changed
  • instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
cursor.execute("INSERT INTO test (testField) VALUES (123)")
3434
cursor.close()
3535
cnx.close()
36+
37+
cnx = MySQLInstrumentor().instrument_connection(cnx)
38+
cursor = cnx.cursor()
39+
cursor.execute("INSERT INTO test (testField) VALUES (123)")
40+
cursor.close()
41+
cnx.close()
3642
3743
API
3844
---

0 commit comments

Comments
 (0)