Skip to content

Commit 690bc9a

Browse files
Update docstring
1 parent 408dc1b commit 690bc9a

File tree

1 file changed

+6
-1
lines changed
  • instrumentation/opentelemetry-instrumentation-pymysql/src/opentelemetry/instrumentation/pymysql

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import pymysql
2727
from opentelemetry.instrumentation.pymysql import PyMySQLInstrumentor
2828
29-
3029
PyMySQLInstrumentor().instrument()
3130
3231
cnx = pymysql.connect(database="MySQL_Database")
@@ -41,6 +40,9 @@
4140
You can optionally configure PyMySQL instrumentation to enable sqlcommenter which enriches
4241
the query with contextual information.
4342
43+
Usage
44+
-----
45+
4446
.. code:: python
4547
4648
import MySQLdb
@@ -55,11 +57,14 @@
5557
cursor.close()
5658
cnx.close()
5759
60+
5861
For example,
5962
::
63+
6064
Invoking cursor.execute("INSERT INTO test (testField) VALUES (123)") will lead to sql query "INSERT INTO test (testField) VALUES (123)" but when SQLCommenter is enabled
6165
the query will get appended with some configurable tags like "INSERT INTO test (testField) VALUES (123) /*tag=value*/;"
6266
67+
6368
SQLCommenter Configurations
6469
***************************
6570
We can configure the tags to be appended to the sqlquery log by adding configuration inside commenter_options(default:{}) keyword

0 commit comments

Comments
 (0)