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

feat(query_perf_monitoring): Implement query performance monitoring metrics #174

Conversation

sairaj18
Copy link
Contributor

Creating this PR to unblock tara-team form creating pre-releases of the integration with the changes of query performance monitoring.

Going forward the pre-release_query_performance branch in the nri-mysql main repo will be used to create new pre-releases until we merge PRs related to forked repo epic to main repo epic

spathlavath and others added 24 commits January 15, 2025 12:37
…king sessions and wait events (#7)

* feat: Introducing query performance monitoring for slow queries, blocking sessions and wait events.

* refactor: Implemented a limit for wait events,  blocking sessions, and included bug fixes (#8)

* refactor: Implemented a limit for wait events,  blocking sessions, and included bug fixes.

* Included a stepID for each row during the query execution iteration

* Added fix for stepID

* Added a fix to ensure that  increments correctly.

* Renamed FETCH_INTERVAL to SLOW_QUERY_FETCH_INTERVAL

* Added detailed logging for each operation, including the time taken for execution.

* refactor: Added configuration option to disable query performance metrics per database (#10)

* refactor: Added configuration option to disable query performance metrics per database

* Revised the list of input arguments for retrieving individual queries.

* Updated logging messages and Revised the list of input arguments for retrieving wait events and blocking session queries.

* Added a helper function to obtain a list of unique databases to exclude.

* code refactoring

* Added fix for number of arguments mismatch for the SQL query

* removed rebind functionality

* updated metricset limit

* reverted metricset limit

* minor code refactoring

* fixed linting errors

* fixed linting errors

* refactor: resolving linting errors (#12)

* refactor: resolving linting errors

* fixing linting errors

* fixing linting errors

* fixing linting errors

* fixing linting errors

* fixing linting errors

* refactor: resolving linting errors (#13)

* refactor: changed log.info to log.debug and other bug fixes (#14)

* refactor: code refactoring and addressing review comments (#15)

* refactor: code refactoring and addressing review comments

* lint issue fixes

* lint issue fixes

* lint issue fixes

* lint issue fixes

* lint issue fixes

* refactor: Added a limit on individual query details and defined min/max values for the limit threshold. (#16)

* refactor: Added a limit on individual query details and defined min/max values for the limit threshold.

* minor enhancements

* minor enhancements

* minor enhancements

* refactor: code resturcturing (#17)

* refactor: code resturcturing

* file name changes

* Blocking sessions query update

* Blocking sessions query update

* package changes

* Added code review fixes

* Added code review fixes

* Added code review fixes

* Added code review fixes

* Added code review fixes

* Added code review fixes

* Added code review fixes

* query execution plan changes

* file name changes

* Added code review fixes
…Delete and Update queries. Updated blocking sessions data model (#18)
…ion times (#20)

Updated wait events query to  analyze wait events and execution times
* updated mysql version check fuction, args list, testcases, checkEssentialInstruments function.

* Improved comments for configuration constants for clarity and context.

* Rename EnableQueryPerformance to EnableQueryMonitoring in ArgumentList struct
…tegration process. This change ensures that the existing integration continues to function smoothly without interruption.
…erences between the OpenDB function here and the one in mysql.go, specifically noting their use of different drivers.
test: add integration tests for performance monitoring
* refactor: Added utility to escape backticks in JSON strings
* Added unit tests for ValidateAndSetDefaults function and fix argument handling
@sairaj18 sairaj18 requested a review from a team as a code owner January 27, 2025 05:02
Copy link
Contributor

@rajrohanyadav rajrohanyadav left a comment

Choose a reason for hiding this comment

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

Approving, to be merged in a feature branch. As I understand, there will be a separate PR to get it merged in main.

@sairaj18 sairaj18 merged commit 1174151 into newrelic:pre-release_query_performance_monitoring Jan 27, 2025
15 checks passed
sairaj18 added a commit that referenced this pull request Jan 27, 2025
…etrics (#174)

feat(query_perf_monitoring): Implement query performance monitoring metrics (#174)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants