Skip to content

Commit

Permalink
fix(pep0249): Add dbname as collecting parameter for PEP0249
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Vital <paulo.vital@ibm.com>
  • Loading branch information
pvital committed Oct 17, 2023
1 parent cd76dd8 commit 55e826e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions instana/instrumentation/pep0249.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def _collect_kvs(self, span, sql):
span.set_tag(ext.DATABASE_INSTANCE, self._connect_params[1]['db'])
elif 'database' in self._connect_params[1]:
span.set_tag(ext.DATABASE_INSTANCE, self._connect_params[1]['database'])
elif 'dbname' in self._connect_params[1]:
span.set_tag(ext.DATABASE_INSTANCE, self._connect_params[1]['dbname'])

span.set_tag(ext.DATABASE_STATEMENT, sql_sanitizer(sql))
span.set_tag(ext.DATABASE_USER, self._connect_params[1]['user'])
Expand Down

0 comments on commit 55e826e

Please sign in to comment.