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

Fixes to database_observability samples collector #2198

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

cristiangreco
Copy link
Collaborator

PR Description

  • Skip queries with schema mysql, performance_schema and information_schema, so we're on par with data from mysqld_exporter
  • Skip truncated queries early before parsing
  • Do not fail the entire processing loop if a query fails to parse
  • Log query type
  • Correctly extract tables from subqueries

Which issue(s) this PR fixes

n.a.

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@matthewnolf matthewnolf changed the title Fixes to database_observability samples colllector Fixes to database_observability samples collector Nov 29, 2024
Copy link
Collaborator

@matthewnolf matthewnolf left a comment

Choose a reason for hiding this comment

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

Looks good

require.NoError(t, err)
})

t.Run("Scan() fail", func(t *testing.T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we be more descriptive to the failure mode here, rather than the function call itself which fails

@cristiangreco cristiangreco force-pushed the cristian/dbo11y-query-sample-fix branch from ca53086 to b3a313e Compare December 2, 2024 16:27
@cristiangreco cristiangreco marked this pull request as ready for review December 2, 2024 16:58
@cristiangreco cristiangreco requested a review from a team as a code owner December 2, 2024 16:58
cristiangreco and others added 5 commits December 3, 2024 12:28
- Skip queries with schema `mysql`, `performance_schema` and
`information_schema`, so we're on par with data from mysqld_exporter
- Skip truncated queries early before parsing
- Do not fail the entire processing loop if a query fails to parse
- Log query type
- Correctly extract tables from subqueries
@cristiangreco cristiangreco force-pushed the cristian/dbo11y-query-sample-fix branch from b3a313e to 37ca4e6 Compare December 3, 2024 11:28
@wildum wildum merged commit 1cc7861 into main Dec 3, 2024
18 checks passed
@wildum wildum deleted the cristian/dbo11y-query-sample-fix branch December 3, 2024 11:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants