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)
204
204
if type (k ) is not int # noqa: E721
205
205
}
206
206
207
+ # support opentelemetry-instrumentation-dbapi
208
+ self .host = host
209
+ self .port = port
210
+ self .user = user
207
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/
208
216
209
217
self ._server_version = tuple (
210
218
[numeric_part (n ) for n in self .get_server_info ().split ("." )[:2 ]]
211
219
)
212
-
213
220
self .encoding = "ascii" # overridden in set_character_set()
214
221
215
222
if not charset :
You can’t perform that action at this time.
0 commit comments