Skip to content

Commit 2b01d10

Browse files
author
Emanuele Palazzetti
authored
Merge pull request #327 from talwai/mysql_pin
mysql: prevent the Pin from attaching empty tags
2 parents 662657c + 8ec8dff commit 2b01d10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ddtrace/contrib/mysql/patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def _connect(func, instance, args, kwargs):
3333

3434
def patch_conn(conn):
3535

36-
tags = {t: getattr(conn, a, '') for t, a in CONN_ATTR_BY_TAG.items()}
36+
tags = {t: getattr(conn, a) for t, a in CONN_ATTR_BY_TAG.items() if getattr(conn, a, '') != ''}
3737
pin = Pin(service="mysql", app="mysql", app_type="db", tags=tags)
3838

3939
# grab the metadata from the conn

0 commit comments

Comments
 (0)