Skip to content

Conversation

eric-weaver
Copy link
Contributor

What does this PR do?

Adds a new metric to Mysql integration reporting back the number of query errors by user, error_name, error_number

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

'name': 'performance_schema.events_errors_summary_by_user_by_error',
'query': """
SELECT
SUM_ERROR_RAISED as errors_raised,
Copy link
Member

Choose a reason for hiding this comment

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

SUM_ERROR_RAISED is a monotonic counter. We should report the delta between executions, not the raw value.

WHERE SUM_ERROR_RAISED > 0
""".strip(),
'columns': [
{'name': 'mysql.performance.errors_raised_by_user', 'type': 'gauge'},
Copy link
Contributor

Choose a reason for hiding this comment

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

Try using monotonic_count, example:

{"name": "index.user_seeks", "type": "monotonic_count"},
{"name": "index.user_scans", "type": "monotonic_count"},
{"name": "index.user_lookups", "type": "monotonic_count"},
{"name": "index.user_updates", "type": "monotonic_count"},

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.

3 participants