Skip to content

Commit b10c1ac

Browse files
tanushanguralrenovate[bot]newrelic-coreint-bot
authored
fix: Update qpm threshold to 1ms (#248)
* fix: Update qpm threshold to 1ms * fix: update log and sample file * fix: Sync with master * Update CHANGELOG.md * Update CHANGELOG.md * fix(deps): update module github.com/stretchr/testify to v1.11.0 * fix(deps): update module github.com/microsoft/go-mssqldb to v1.9.3 * Update changelog with changes from v2.20.3 * fix(deps): update module github.com/stretchr/testify to v1.11.1 * fix: log file * Update CHANGELOG.md * fix: Update changeLog --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: newrelic-coreint-bot <coreint-dev@newrelic.com>
1 parent 1418dd8 commit b10c1ac

5 files changed

Lines changed: 8 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ Unreleased section should follow [Release Toolkit](https://github.com/newrelic/r
99

1010
## Unreleased
1111

12+
### enhancements
13+
- Reduced QueryMonitoringResponseTimeThreshold from 500ms to 1ms to improve visibility of Individual query performance data immediately
14+
1215
## v2.20.3 - 2025-08-26
1316

1417
### ⛓️ Dependencies

mssql-config.yml.sample

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ integrations:
3737
# ENABLE_QUERY_MONITORING : "false"
3838

3939
# Threshold in milliseconds for query response time. If response time exceeds this threshold, the query will be considered slow.
40-
# QUERY_MONITORING_RESPONSE_TIME_THRESHOLD : "500"
40+
# QUERY_MONITORING_RESPONSE_TIME_THRESHOLD : "1"
4141

4242
# Query count limit for fetching grouped slow query, wait query, blocking sessions and execution plan query performance metrics in each FETCH_INTERVAL
4343
# QUERY_MONITORING_COUNT_THRESHOLD : "20"
@@ -90,7 +90,7 @@ integrations:
9090
# ENABLE_QUERY_MONITORING : "false"
9191

9292
# Threshold in milliseconds for query response time. If response time exceeds this threshold, the query will be considered slow.
93-
# QUERY_MONITORING_RESPONSE_TIME_THRESHOLD : "500"
93+
# QUERY_MONITORING_RESPONSE_TIME_THRESHOLD : "1"
9494

9595
# Query count limit for fetching grouped slow query, wait query, blocking sessions and execution plan query performance metrics in each FETCH_INTERVAL
9696
# QUERY_MONITORING_COUNT_THRESHOLD : "20"

src/args/argument_list.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type ArgumentList struct {
3838
ExtraConnectionURLArgs string `default:"" help:"Appends additional parameters to connection url. Ex. 'applicationintent=readonly&foo=bar'"`
3939
EnableDiskMetricsInBytes bool `default:"true" help:"Enable collection of instance.diskInBytes."`
4040
EnableQueryMonitoring bool `default:"false" help:"Enable collection of detailed query performance metrics."`
41-
QueryMonitoringResponseTimeThreshold int `default:"500" help:"Threshold in milliseconds for query response time. If response time exceeds this threshold, the query will be considered slow."`
41+
QueryMonitoringResponseTimeThreshold int `default:"1" help:"Threshold in milliseconds for query response time. If response time exceeds this threshold, the query will be considered slow."`
4242
QueryMonitoringCountThreshold int `default:"20" help:"Maximum number of queries returned in query analysis results."`
4343
QueryMonitoringFetchInterval int `default:"15" help:"Interval in seconds for fetching grouped slow queries; Should always be same as mysql-config interval."`
4444
}

src/queryanalysis/config/query_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ const TextTruncateLimit = 4094
356356
const (
357357
// QueryResponseTimeThresholdDefault defines the default threshold in milliseconds
358358
// for determining if a query is considered slow based on its response time.
359-
QueryResponseTimeThresholdDefault = 500
359+
QueryResponseTimeThresholdDefault = 1
360360

361361
// SlowQueryCountThresholdDefault sets the default maximum number of slow queries
362362
// that is ingested in an analysis cycle/interval.

tests/mssql_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func TestIntegrationSupportedDatabase(t *testing.T) {
9999
{
100100
name: "Perf metrics on supported database with perf disabled and more custom parameters",
101101
containers: perfContainers,
102-
args: []string{`-enable_query_monitoring=false`, `-query_monitoring_response_time_threshold=500`, `query_monitoring_fetch_interval=5`, `-query_monitoring_count_threshold=10`},
102+
args: []string{`-enable_query_monitoring=false`, `-query_monitoring_response_time_threshold=1`, `query_monitoring_fetch_interval=5`, `-query_monitoring_count_threshold=10`},
103103
expectedSampleTypes: instanceSampleOnly,
104104
},
105105
}

0 commit comments

Comments
 (0)