-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[receiver/sqlserver] Add collection interval for top query #40002
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
[receiver/sqlserver] Add collection interval for top query #40002
Conversation
This PR should not be part of |
- This value can only guarantee that the top queries are collected at most once in this interval. | ||
- For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `60s`. | ||
- In this case, the default receiver scraper will still try to run in every 10 seconds. | ||
- However, the top queries collection will only run after 60 seconds have passed since the last collection. | ||
- For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `5s`. | ||
- In this case, `top_query_collection.collection_internal` will make no effects to the collection |
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.
This feels like it should be moved out from the attribute definitions, and into its own section that can explain it in more detail.
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.
This document is specifically intended for configurations, so it seems appropriate to include it here?
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.
As a user who is new to the component, this is a lot of context provided as dot points. To help give a deeper background and context, it should be moved to its own section and expanded upon in a paragraph so examples can also be given.
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.
I wouldn't call this a blocking action, but as a user it would be nice to provide that extra context in a more naturally written form.
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.
LGTM once comments are addressed 👍
I'll wait on |
- This value can only guarantee that the top queries are collected at most once in this interval. | ||
- For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `60s`. | ||
- In this case, the default receiver scraper will still try to run in every 10 seconds. | ||
- However, the top queries collection will only run after 60 seconds have passed since the last collection. | ||
- For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `5s`. | ||
- In this case, `top_query_collection.collection_internal` will make no effects to the collection |
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.
I wouldn't call this a blocking action, but as a user it would be nice to provide that extra context in a more naturally written form.
…metry#40002) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR added `collection_interval` for top query to make the collection not too frequent: - This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). - This value can only guarantee that the top queries are collected at most once in this interval. - For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `60s`. - In this case, the default receiver scraper will still try to run in every 10 seconds. - However, the top queries collection will only run after 60 seconds have passed since the last collection. - For instance, you have global `collection_interval` as `10s` and `top_query_collection.collection_interval` as `5s`. - In this case, `top_query_collection.collection_internal` will make no effects to the collection <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue n/a <!--Describe what testing was performed and which tests were added.--> #### Testing Updated <!--Describe the documentation added.--> #### Documentation Updated <!--Please delete paragraphs that you did not use before submitting.--> --------- Co-authored-by: Curtis Robert <[email protected]>
Description
This PR added
collection_interval
for top query to make the collection not too frequent:collection_interval
as10s
andtop_query_collection.collection_interval
as60s
.collection_interval
as10s
andtop_query_collection.collection_interval
as5s
.top_query_collection.collection_internal
will make no effects to the collectionLink to tracking issue
n/a
Testing
Updated
Documentation
Updated