Skip to content

Commit

Permalink
Update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi committed Oct 17, 2024
1 parent 408dc1b commit 690bc9a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import pymysql
from opentelemetry.instrumentation.pymysql import PyMySQLInstrumentor
PyMySQLInstrumentor().instrument()
cnx = pymysql.connect(database="MySQL_Database")
Expand All @@ -41,6 +40,9 @@
You can optionally configure PyMySQL instrumentation to enable sqlcommenter which enriches
the query with contextual information.
Usage
-----
.. code:: python
import MySQLdb
Expand All @@ -55,11 +57,14 @@
cursor.close()
cnx.close()
For example,
::
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
the query will get appended with some configurable tags like "INSERT INTO test (testField) VALUES (123) /*tag=value*/;"
SQLCommenter Configurations
***************************
We can configure the tags to be appended to the sqlquery log by adding configuration inside commenter_options(default:{}) keyword
Expand Down

0 comments on commit 690bc9a

Please sign in to comment.