Skip to content

Commit 8ec8dff

Browse files
authored
mysql: prevent the Pin from attaching empty tags
1 parent f4bee81 commit 8ec8dff

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)