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

[mysql] add dbms_flavor tag to tell if the database is mysql or mariadb #18950

Merged
merged 6 commits into from
Nov 1, 2024

Conversation

lu-zhengda
Copy link
Contributor

What does this PR do?

This PR adds dbms_flavor tag to the mysql integration metrics and events. The tag can better support explain parsing due to different explain plan format between mysql and mariadb.

Motivation

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.30%. Comparing base (266a978) to head (c87e0bb).
Report is 2 commits behind head on master.

Additional details and impacted files
Flag Coverage Δ
activemq ?
cassandra ?
hive ?
hivemq ?
hudi ?
ignite ?
jboss_wildfly ?
kafka ?
mysql 89.46% <83.33%> (-0.11%) ⬇️
presto ?
solr ?

Flags with carried forward coverage won't be shown. Click here to find out more.

eric-weaver
eric-weaver previously approved these changes Oct 30, 2024
@lu-zhengda lu-zhengda added this pull request to the merge queue Nov 1, 2024
Comment on lines +856 to +859
return dbm_instance.get('tags', []) + [
'server:{}'.format(common.HOST),
'port:{}'.format(common.PORT),
'dbms_flavor:{}'.format(MYSQL_FLAVOR.lower()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better to use f"" formatting? it's a little bit less verbose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

f"" is more concise. i use the same .format syntax for consistency. we used .format in the past because f"" is python3 only. it's no longer a concern now.

Merged via the queue into master with commit d962068 Nov 1, 2024
43 checks passed
@lu-zhengda lu-zhengda deleted the zhengda.lu/mysql-flavor branch November 1, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants