Skip to content

Commit c38ef19

Browse files
committed
fix tox -e docs issues
1 parent 45f7ad3 commit c38ef19

File tree

5 files changed

+15
-15
lines changed
  • instrumentation
    • opentelemetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient
    • opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql
    • opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2
    • opentelemetry-instrumentation-pymysql/src/opentelemetry/instrumentation/pymysql
    • opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3

5 files changed

+15
-15
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,11 @@ def instrument_connection(self, connection, tracer_provider=None):
9292
"""Enable instrumentation in a MySQL connection.
9393
9494
Args:
95-
connection (mysql.connector.Connection):
95+
connection:
9696
The existing MySQL connection instance to instrument. This connection is typically
9797
obtained through `mysql.connector.connect()` and is instrumented to collect telemetry
9898
data about database interactions.
99-
tracer_provider (TracerProvider, optional):
99+
tracer_provider:
100100
An optional `TracerProvider` instance to use for tracing. If not provided, the globally
101101
configured tracer provider will be automatically used.
102102

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
"db_driver": True,
6464
"mysql_client_version": True,
6565
"driver_paramstyle": False
66-
}
67-
)
66+
}
67+
)
6868
cursor = instrumented_cnx.cursor()
6969
cursor.execute("INSERT INTO test (testField) VALUES (123)"
7070
instrumented_cnx.commit()
@@ -177,17 +177,17 @@ def instrument_connection(
177177
"""Enable instrumentation in a mysqlclient connection.
178178
179179
Args:
180-
connection (MySQLdb.connect or Connection object):
180+
connection:
181181
The MySQL connection instance to instrument. This connection is typically
182182
created using `MySQLdb.connect()` and needs to be wrapped to collect telemetry.
183-
tracer_provider (TracerProvider, optional):
183+
tracer_provider:
184184
A custom `TracerProvider` instance to be used for tracing. If not specified,
185185
the globally configured tracer provider will be used.
186-
enable_commenter (bool, optional):
186+
enable_commenter:
187187
A flag to enable the OpenTelemetry SQLCommenter feature. If set to `True`,
188188
SQL queries will be enriched with contextual information (e.g., database client details).
189189
Default is `None`.
190-
commenter_options (dict, optional):
190+
commenter_options:
191191
A dictionary of configuration options for SQLCommenter. This allows you to customize
192192
metadata appended to queries. Possible options include:
193193
- `db_driver`: Adds the database driver name and version.
@@ -196,8 +196,6 @@ def instrument_connection(
196196
- `mysql_client_version`: Adds the MySQL client version.
197197
- `driver_paramstyle`: Adds the parameter style.
198198
- `opentelemetry_values`: Includes traceparent values.
199-
Refer to *SQLCommenter Configurations* above for more information
200-
201199
Returns:
202200
An instrumented MySQL connection with OpenTelemetry support enabled.
203201
"""

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
cursor.execute("INSERT INTO test (testField) VALUES (123)")
104104
cursor.close()
105105
instrumented_cnx.close()
106+
106107
API
107108
---
108109
"""

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,16 @@ def instrument_connection(
179179
"""Enable instrumentation in a PyMySQL connection.
180180
181181
Args:
182-
connection (pymysql.Connection):
182+
connection:
183183
The existing PyMySQL connection instance that needs to be instrumented.
184184
This connection was typically created using `pymysql.connect()` and is wrapped with OpenTelemetry tracing.
185-
tracer_provider (TracerProvider, optional):
185+
tracer_provider:
186186
An optional `TracerProvider` instance that specifies which tracer provider should be used.
187187
If not provided, the globally configured OpenTelemetry tracer provider is automatically applied.
188-
enable_commenter (bool, optional):
188+
enable_commenter:
189189
A flag to enable the SQL Commenter feature. If `True`, query logs will be enriched with additional
190190
contextual metadata (e.g., database version, traceparent IDs, driver information).
191-
commenter_options (dict, optional):
191+
commenter_options:
192192
A dictionary containing configuration options for the SQL Commenter feature.
193193
You can specify various options, such as enabling driver information, database version logging,
194194
traceparent propagation, and other customizable metadata enhancements.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
cursor.execute("SELECT * FROM test")
4545
cursor.close()
4646
instrumented_connection.close()
47+
4748
API
4849
---
4950
"""
@@ -111,7 +112,7 @@ def instrument_connection(
111112
the current globally configured one is used.
112113
113114
Returns:
114-
SQLite3Connection: An instrumented SQLite connection that supports
115+
An instrumented SQLite connection that supports
115116
telemetry for tracing database operations.
116117
117118
Notes:

0 commit comments

Comments
 (0)