Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mysql_version and mysql_flavor to dbm query metrics payloads #10915

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mysql/datadog_checks/mysql/statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def collect_per_statement_metrics(self):
payload = {
'host': self._check.resolved_hostname,
'timestamp': time.time() * 1000,
'mysql_version': self._check.version.version + '+' + self._check.version.build,
'mysql_flavor': self._check.version.flavor,
'ddagentversion': datadog_agent.get_version(),
'min_collection_interval': self._metric_collection_interval,
'tags': self._tags,
Expand Down
2 changes: 2 additions & 0 deletions mysql/tests/test_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def run_query(q):

assert event['host'] == 'stubbed.hostname'
assert event['ddagentversion'] == datadog_agent.get_version()
assert event['mysql_version'] == mysql_check.version.version + '+' + mysql_check.version.build
assert event['mysql_flavor'] == mysql_check.version.flavor
assert event['timestamp'] > 0
assert event['min_collection_interval'] == dbm_instance['query_metrics']['collection_interval']
expected_tags = set(tags.METRIC_TAGS + ['server:{}'.format(common.HOST), 'port:{}'.format(common.PORT)])
Expand Down