File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -204,12 +204,19 @@ class object, used to create cursors (keyword only)
204204 if type (k ) is not int # noqa: E721
205205 }
206206
207+ # support opentelemetry-instrumentation-dbapi
208+ self .host = host
209+ self .port = port
210+ self .user = user
207211 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/
208216
209217 self ._server_version = tuple (
210218 [numeric_part (n ) for n in self .get_server_info ().split ("." )[:2 ]]
211219 )
212-
213220 self .encoding = "ascii" # overridden in set_character_set()
214221
215222 if not charset :
You can’t perform that action at this time.
0 commit comments