Skip to content

Conversation

@vishal-dt
Copy link
Contributor

@vishal-dt vishal-dt commented Feb 8, 2023

Description

Currently all queries are logged, with this PR we are introducing a feature to add a separate configuration for only logging queries which exceeds a threshold duration

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I have performed a self-review of my own code.

Does this PR introduce a user-facing change?


@vishal-dt vishal-dt self-assigned this Feb 8, 2023
dbConnection.OnQueryProcessed(func(event *pg.QueryProcessedEvent) {
query, err := event.FormattedQuery()
if err != nil {
panic(err)
Copy link
Contributor

Choose a reason for hiding this comment

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

lets use logger here.

@vishal-dt vishal-dt marked this pull request as ready for review February 9, 2023 05:03
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vishal-dt vishal-dt requested a review from anupdhiran February 10, 2023 05:44
@vishal-dt vishal-dt merged commit b277de9 into main Feb 22, 2023
@vishal-dt vishal-dt deleted the feature-log-query-exc-threshold branch February 22, 2023 12:17
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