[DBMON-6805] Add DBMS class attribute to DatabaseCheck#24297
Open
eric-weaver wants to merge 2 commits into
Open
[DBMON-6805] Add DBMS class attribute to DatabaseCheck#24297eric-weaver wants to merge 2 commits into
eric-weaver wants to merge 2 commits into
Conversation
|
Contributor
Validation Report
Run Passed validations (20)
|
sethsamuel
approved these changes
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an explicit
DBMSclass attribute to the baseDatabaseCheckclass and makes thedbmsproperty prefer it:DBMS: str | None = None— the authoritative DBM platform identifier (e.g."postgres","sqlserver") that integrations declare on their check class.dbmsproperty returnsDBMSwhen set, and otherwise falls back to the existingclass-name derivation (
self.__class__.__name__.lower()). The fallback now logs a one-timedeprecation warning so integrations that haven't declared
DBMSare easy to spot.This is intentionally non-breaking: behavior is unchanged for any check that doesn't set
DBMS, so nothing regresses until integrations opt in.Motivation
The
dbmsvalue is the DBM platform identifier used across DBM event payloads, metric nameprefixes, and async jobs. Deriving it from the class name is unreliable — it only produces the
correct value for some integrations (e.g.
PostgreSql→postgresqlandClickhouseCheck→clickhousecheckare both wrong), which has already forced ad-hoc property overrides and asprawl of hardcoded
"dbms"string literals throughout the DBM integrations.This PR lays the groundwork to fix that: it introduces a single, explicit place for each
integration to declare its identifier. Follow-up PRs will set
DBMSon eachDatabaseChecksubclass and route the scattered string literals through the
dbmsproperty, after which thedeprecated name-derivation fallback can be removed.
Review checklist (to be filled by reviewers)
qa/requiredif this PR needs QA validation, orqa/skip-qaif it does not. Exactly one of the two is required.backport/<branch-name>label to the PR and it will automatically open a backport PR once this one is merged