diff --git a/postgres/CHANGELOG.md b/postgres/CHANGELOG.md index 5ef53f10c50bf..a232cce979191 100644 --- a/postgres/CHANGELOG.md +++ b/postgres/CHANGELOG.md @@ -4,6 +4,7 @@ ***Added***: +* Add schema collection to Postgres integration ([#15484](https://github.com/DataDog/integrations-core/pull/15484)) * Add schema collection to Postgres integration ([#15484](https://github.com/DataDog/integrations-core/pull/15484)) ## 14.1.0 / 2023-08-10 diff --git a/postgres/datadog_checks/postgres/statement_samples.py b/postgres/datadog_checks/postgres/statement_samples.py index 968333f157d98..f507a0877af41 100644 --- a/postgres/datadog_checks/postgres/statement_samples.py +++ b/postgres/datadog_checks/postgres/statement_samples.py @@ -344,6 +344,8 @@ def _filter_and_normalize_statement_rows(self, rows): 'backend_type', 'client backend' ) == 'client backend': continue + if row['client_addr']: + row['client_addr'] = str(row['client_addr']) query = row['query'] if query == '': insufficient_privilege_count += 1 @@ -736,7 +738,7 @@ def _collect_plan_for_statement(self, row): "cloud_metadata": self._config.cloud_metadata, "network": { "client": { - "ip": row.get('client_addr', None), + "ip": str(row.get('client_addr', None)), "port": row.get('client_port', None), "hostname": row.get('client_hostname', None), }