You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[receiver/oracledb] Oracle top query collection interval (#44505)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
At present, only the SQLServer receiver allows an independent collection
interval to be configured for top query metrics. Because the Oracle
receiver lacks this option, users must configure it twice—separately for
top queries and samples—whenever different collection intervals are
required.
This PR is to do a similar implementation in Oracle receiver.
With this change now the `collection_interval` for top_query_collection
can be configured as below.
```
receivers:
oracledb:
datasource: "oracle://system:[email protected]:1521/XEPDB1"
top_query_collection:
collection_interval: 60s <--- new config parameter
max_query_sample_count: 1000
top_query_count: 200
```
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes#44607
<!--Describe what testing was performed and which tests were added.-->
#### Testing
Unit tests added
<!--Describe the documentation added.-->
#### Documentation
<!--Please delete paragraphs that you did not use before submitting.-->
assert.Equal(t, 0, logsCol2.ResourceLogs().Len(), "top_query should not be collected until %s elapsed.", scrpr.topQueryCollectCfg.CollectionInterval.String())
0 commit comments