-
Notifications
You must be signed in to change notification settings - Fork 3k
[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
Changes from 2 commits
a560079
697dde0
838fdf9
8ea972c
f60f085
cc5c9a6
d6f1c82
4313bfb
25d1235
0ee233b
db62e21
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Use this changelog template to create an entry for release notes. | ||
|
||
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' | ||
change_type: enhancement | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: sqlserverreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: This PR adds `top_query_collection.collection_interval` for top query collection to make the collection not that frequent. | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [40002] | ||
|
||
# (Optional) One or more lines of additional information to render under the primary note. | ||
# These lines will be padded with 2 spaces and then inserted directly into the document. | ||
# Use pipe (|) for multiline entries. | ||
subtext: | | ||
- This change only applies to the `top_query_collection` feature. | ||
- The default value is `60s` | ||
|
||
# If your change doesn't affect end users or the exported elements of any package, | ||
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. | ||
# Optional: The change log or logs in which this entry should be included. | ||
# e.g. '[user]' or '[user, api]' | ||
# Include 'user' if the change is relevant to end users. | ||
# Include 'api' if there is a change to a library API. | ||
# Default: '[user]' | ||
change_logs: [user] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,14 @@ Top-Query collection specific options (only useful when top-query collection are | |
- Queries that were finished execution outside the lookback window are not included in the collection. Increasing the lookback window (in seconds) will be useful for capturing long-running queries. | ||
- `max_query_sample_count` (optional, example = `5000`, default = `1000`): The maximum number of records to fetch in a single run. | ||
- `top_query_count`: (optional, example = `100`, default = `200`): The maximum number of active queries to report (to the next consumer) in a single run. | ||
- `collection_interval`: (optional, default = `60s`): The interval at which top queries should be emitted by this receiver. | ||
- This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). | ||
sincejune marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- 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 | ||
Comment on lines
+51
to
+56
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe 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 commentThe 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. |
||
- `enabled`: (optional, default = `false`): Enable collection of top queries. | ||
- e.g. `sqlserver` receiver will fetch 1000 (value: `max_query_sample_count`) queries from database and report the top 200 (value: `top_query_count`) which used the most CPU time. | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.