-
Notifications
You must be signed in to change notification settings - Fork 33
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 Performance monitoring tech debt #199
base: master
Are you sure you want to change the base?
Feat : Query Performance monitoring tech debt #199
Conversation
tharun0064
commented
Feb 21, 2025
- Removed System queries and OHI queries filter
- Added more unit test cases
- Added QueryMonitoringOnly flag to enable only query monitoring feature
- usage of marshal metrics
- common function which is reused to fetch metrics
- return parameter which were expected datatype instead of nil
1. Removed System queries and OHI queries filter 2. Added more unit test cases 3. Added QueryMonitoringOnly flag to enable only query monitoring feature 4. usage of marshal metrics 5. common function which is reused to fetch metrics 6. return parameter which were expected datatype instead of nil
* add case-insensitive like operation
* exclude explain queries in wait events
} | ||
// For PostgreSQL versions 13 and 12, anonymization of queries does not occur for blocking sessions, so it's necessary to explicitly anonymize them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add this comment back as it would be helpful while refering in future.
} | ||
} | ||
} | ||
|
||
// IngestMetric is a util by which we publish data in batches .Reason for this is to avoid publishing large data in one go and its a limitation for NewRelic. | ||
func IngestMetric(metricList []interface{}, eventName string, pgIntegration *integration.Integration, cp *commonparameters.CommonParameters) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit tests for testing when this func errors out are missing.
enabledExtensions := map[string]bool{"pg_wait_sampling": false} | ||
err := PopulateWaitEventMetrics(conn, pgIntegration, cp, enabledExtensions) | ||
assert.Equal(t, err, commonutils.ErrNotEligible) | ||
assert.NoError(t, mock.ExpectationsWereMet()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need this, is checking assert.Equal(t, err, commonutils.ErrNotEligible)
not enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on these changes. Left few comments.
Also, I see this particular tech debt is not addressed in this PR could you look into it.