diff --git a/postgres/datadog_checks/postgres/statements.py b/postgres/datadog_checks/postgres/statements.py index 7786f0365deb4..9e35e4cd430ac 100644 --- a/postgres/datadog_checks/postgres/statements.py +++ b/postgres/datadog_checks/postgres/statements.py @@ -167,7 +167,7 @@ def row_keyfunc(row): continue value = row[column] if column == 'query': - value = normalize_query_tag(value) + value = normalize_query_tag(normalized_query) tags.append('{tag_name}:{value}'.format(tag_name=tag_name, value=value)) for column, metric_name in PG_STAT_STATEMENTS_METRIC_COLUMNS.items():