We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8103651 commit a4c2a49Copy full SHA for a4c2a49
src/MySQLdb/connections.py
@@ -204,12 +204,19 @@ class object, used to create cursors (keyword only)
204
if type(k) is not int # noqa: E721
205
}
206
207
+ # support opentelemetry-instrumentation-dbapi
208
+ self.host = host
209
+ self.port = port
210
+ self.user = user
211
self.database = kwargs2.get("database", "")
212
+ # otel-inst-mysqlclient uses db instead of database.
213
+ self.db = self.database
214
+ # NOTE: We have not supported semantic conventions yet.
215
+ # https://opentelemetry.io/docs/specs/semconv/database/sql/
216
217
self._server_version = tuple(
218
[numeric_part(n) for n in self.get_server_info().split(".")[:2]]
219
)
-
220
self.encoding = "ascii" # overridden in set_character_set()
221
222
if not charset:
0 commit comments