-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[TEEP-3981] feat(agentprofiling check): add agent termination option to agentprofiling check #44631
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
Merged
+119
−18
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8a8499b
[TEEP-3981] feat(agentprofiling check): add agent termination option …
mwdd146980 5591712
fix(corechecks): fix test mode detection to handle -test.v=true forma…
mwdd146980 874718c
Adding release note
mwdd146980 405753b
remove double s
mwdd146980 3998638
refactor(agentprofiling): use signals.Stopper for graceful shutdown i…
mwdd146980 4dc39a5
Replace manual os.Args and binary name checks with testing.Testing()
mwdd146980 db37b1b
Fix capitalization in release note
mwdd146980 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
releasenotes/notes/agentprofiling-check-terminate-threshold-feat-6f35b801e1ace36e.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Each section from every release note are combined when the | ||
| # CHANGELOG.rst is rendered. So the text needs to be worded so that | ||
| # it does not depend on any information only available in another | ||
| # section. This may mean repeating some details, but each section | ||
| # must be readable independently of the other. | ||
| # | ||
| # Each section note must be formatted as reStructuredText. | ||
| --- | ||
| features: | ||
| - | | ||
| The Agent Profiling check now supports automatic Agent termination after flare generation when memory or CPU thresholds are exceeded. This feature is useful in resource-constrained environments where the Agent needs to be restarted after generating diagnostic information. | ||
|
|
||
| Enable this feature by setting `terminate_agent_on_threshold: true` in the Agent Profiling check configuration. When enabled, the Agent uses its established shutdown mechanism to trigger graceful shutdown after successfully generating a flare, ensuring proper cleanup before exit. | ||
|
|
||
| **Warning**: This feature will cause the Agent to exit. This feature is disabled by default and should be used with caution. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 function can terminate early if generating a flare causes an error. Under this scenario, the agent has exceeded the resource threshold but has not terminated itself. Is this behavior what you intend?
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.
Yes. In the case that
terminate_agent_on_threshold: trueis set, I think customers will find it more important that the Agent is shutdown because they do not want the Agent to continue hogging resources.Additionally, most flare generation errors happen because the flare was unable to send to our intake, but it will still be available locally in a temp folder. I almost never see the flare fail to generate completely.