-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[extension/opampextension]: Adding AcceptsRestartCommand capability #45056
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
evan-bradley
merged 33 commits into
open-telemetry:main
from
bvigar:tv/collector_config_restart
Jan 28, 2026
Merged
Changes from 3 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
68aa1b2
Adding AcceptsRemoteConfig capability to opamp extension
bvigar e1e256e
Adding changelog and updating README
bvigar d6cd0b8
Merge branch 'main' into tv/collector_config_restart
bvigar f5dab6d
Updating capability to AcceptsRestartCommand and adding new feature gate
bvigar 007d565
Merge branch 'tv/collector_config_restart' of github.com:bvigar/opent…
bvigar 25d0e8a
Finished onCommand tests
bvigar 747d634
Go mod tidy and some linter fixes
bvigar d9a5e3d
Updating readme
bvigar e0a8d98
Merge remote-tracking branch 'origin/main' into tv/collector_config_r…
bvigar 6605a75
Removing unused var
bvigar 0a36776
Updating signal logic to support windows
bvigar 8acb015
gci lint fixes
bvigar ceeb5dc
gofmt lint fixes
bvigar 10c35cd
Merge remote-tracking branch 'origin/main' into tv/collector_config_r…
bvigar eddbbe4
gogci fix again
bvigar 06c95b8
Handling windows before signaling
bvigar f5d2d04
PR feedback
bvigar 0879033
Merge remote-tracking branch 'origin/main' into tv/collector_config_r…
bvigar 09acc3c
Go mod tidy
bvigar 99e1e7b
README updates and refactoring how config is validated
bvigar aa2a2f6
Update extension/opampextension/README.md
bvigar ee97029
Update extension/opampextension/README.md
bvigar cf3723f
Update extension/opampextension/README.md
bvigar 651ea08
Update extension/opampextension/opamp_agent.go
bvigar 60d76bc
Update extension/opampextension/README.md
bvigar 0d1b947
Moving feature gate enablement on windows check to config validation
bvigar 3d9b7ed
Merge branch 'tv/collector_config_restart' of github.com:bvigar/opent…
bvigar ae3561e
Updating readme
bvigar 280d4b2
PR feedback
bvigar 3b9cf7a
Merge remote-tracking branch 'origin/main' into tv/collector_config_r…
bvigar b142e33
Merge remote-tracking branch 'origin/main' into tv/collector_config_r…
bvigar 65fedc4
Merge remote-tracking branch 'origin/main' into tv/collector_config_r…
bvigar b7f5754
Apply suggestions from code review
evan-bradley 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # 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. receiver/filelog) | ||
| component: extension/opamp | ||
|
|
||
| # A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
| note: This change adds support for the OpAMP AcceptsRemoteConfig capability. This capability has been implemented in the OpAMP supervisor, but this adds functionality to the extension which sends the SIGHUP signal to restart the collector which will reload the config on startup. | ||
|
|
||
| # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
| issues: [45056] | ||
|
|
||
| # (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: | ||
|
|
||
| # 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] | ||
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
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 |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ import ( | |
| "sort" | ||
| "strings" | ||
| "sync" | ||
| "syscall" | ||
|
|
||
| "github.com/google/uuid" | ||
| "github.com/oklog/ulid/v2" | ||
|
|
@@ -464,6 +465,12 @@ func (o *opampAgent) onMessage(_ context.Context, msg *types.MessageData) { | |
| if msg.CustomMessage != nil { | ||
| o.customCapabilityRegistry.ProcessMessage(msg.CustomMessage) | ||
| } | ||
| if msg.RemoteConfig != nil { | ||
| o.logger.Info("received remote config — sending SIGHUP to reload") | ||
bvigar marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if err := syscall.Kill(os.Getpid(), syscall.SIGHUP); err != nil { | ||
|
||
| o.logger.Error("sending sighup signal", zap.Error(err)) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| func (o *opampAgent) setHealth(ch *protobufs.ComponentHealth) { | ||
|
|
||
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
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.
Uh oh!
There was an error while loading. Please reload this page.