diff --git a/sqlserver/datadog_checks/sqlserver/activity.py b/sqlserver/datadog_checks/sqlserver/activity.py index 505abe537067b..bdbf11624f0f0 100644 --- a/sqlserver/datadog_checks/sqlserver/activity.py +++ b/sqlserver/datadog_checks/sqlserver/activity.py @@ -250,14 +250,14 @@ def run_job(self): @tracked_method(agent_check_getter=agent_check_getter) def _collect_deadlocks(self): deadlock_xmls = self._deadlocks.collect_deadlocks() - #deadlocks_event = self._create_deadlock_event(deadlock_xmls) - #payload = json.dumps(deadlocks_event, default=default_json_event_encoding) - #self._check.database_monitoring_deadlocks(payload) + deadlocks_event = self._create_deadlock_event(deadlock_xmls) + payload = json.dumps(deadlocks_event, default=default_json_event_encoding) + self._check.database_monitoring_query_activity(payload) - deadlocks_event_activity = self._create_activity_event([], [], deadlock_xmls) - payload = json.dumps(deadlocks_event_activity, default=default_json_event_encoding) - self._check.database_monitoring_query_activity(payload) + #deadlocks_event_activity = self._create_activity_event([], [], deadlock_xmls) + #payload = json.dumps(deadlocks_event_activity, default=default_json_event_encoding) + #self._check.database_monitoring_query_activity(payload) @tracked_method(agent_check_getter=agent_check_getter) def _get_active_connections(self, cursor): @@ -420,7 +420,7 @@ def _sanitize_row(row, obfuscated_statement=None): def _get_estimated_row_size_bytes(row): return len(str(row)) - def _create_activity_event(self, active_sessions, active_connections, deadlocks = []): + def _create_activity_event(self, active_sessions, active_connections): event = { "host": self._check.resolved_hostname, "ddagentversion": datadog_agent.get_version(), @@ -434,7 +434,6 @@ def _create_activity_event(self, active_sessions, active_connections, deadlocks "cloud_metadata": self._config.cloud_metadata, "sqlserver_activity": active_sessions, "sqlserver_connections": active_connections, - "sqlserver_deadlocks": deadlocks, } return event