File tree Expand file tree Collapse file tree
datadog_checks/base/checks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Implement the `DatabaseCheck.tags` property backed by a shared `TagManager` so DBM integrations can consolidate tag handling.
Original file line number Diff line number Diff line change 44
55from abc import abstractmethod
66
7+ from datadog_checks .base .utils .db .utils import TagManager
8+
79from . import AgentCheck
810
911
1012class DatabaseCheck (AgentCheck ):
13+ def __init__ (self , * args , ** kwargs ):
14+ super ().__init__ (* args , ** kwargs )
15+ self .tag_manager = TagManager ()
16+
1117 def database_monitoring_query_sample (self , raw_event : str ):
1218 self .event_platform_event (raw_event , "dbm-samples" )
1319
@@ -43,9 +49,8 @@ def dbms_version(self) -> str:
4349 pass
4450
4551 @property
46- @abstractmethod
4752 def tags (self ) -> list [str ]:
48- pass
53+ return self . tag_manager . get_tags ()
4954
5055 @property
5156 @abstractmethod
You can’t perform that action at this time.
0 commit comments