Skip to content

Commit 9ac3431

Browse files
[DBMON-6788] Remove duplicated tags logic from clickhouse (#24272)
* [DBMON-6788] Remove duplicated tags logic from clickhouse Co-authored-by: Cursor <cursoragent@cursor.com> * Add changelog Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 292e6a2 commit 9ac3431

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

clickhouse/changelog.d/24272.fixed

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove duplicated tags logic now provided by the DatabaseCheck base class.

clickhouse/datadog_checks/clickhouse/clickhouse.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from datadog_checks.base import AgentCheck
1111
from datadog_checks.base.checks.db import DatabaseCheck
1212
from datadog_checks.base.utils.db import QueryManager
13-
from datadog_checks.base.utils.db.utils import TagManager, default_json_event_encoding, resolve_db_host
13+
from datadog_checks.base.utils.db.utils import default_json_event_encoding, resolve_db_host
1414
from datadog_checks.base.utils.serialization import json
1515

1616
from . import advanced_queries, queries, utils
@@ -64,8 +64,6 @@ def __init__(self, name, init_config, instances):
6464
# Track last emission time for database instance metadata (rate limiting)
6565
self._database_instance_last_emitted = 0
6666

67-
# Initialize TagManager for tag management (similar to MySQL)
68-
self.tag_manager = TagManager()
6967
self.tag_manager.set_tags_from_list(self._config.tags, replace=True)
7068
self._add_core_tags()
7169

@@ -142,11 +140,6 @@ def _init_dbm_components(self):
142140
else:
143141
self.parts_and_merges = None
144142

145-
@property
146-
def tags(self) -> list[str]:
147-
"""Return the current list of tags from the TagManager."""
148-
return list(self.tag_manager.get_tags())
149-
150143
def _add_core_tags(self):
151144
"""
152145
Add tags that should be attached to every metric/event.

0 commit comments

Comments
 (0)