Skip to content

[cmd/opampsupervisor] Make the Collector stop grace period configurable - #50916

Open
singhvibhanshu wants to merge 1 commit into
open-telemetry:mainfrom
singhvibhanshu:opampsupervisor-configurable-stop-grace-period
Open

[cmd/opampsupervisor] Make the Collector stop grace period configurable#50916
singhvibhanshu wants to merge 1 commit into
open-telemetry:mainfrom
singhvibhanshu:opampsupervisor-configurable-stop-grace-period

Conversation

@singhvibhanshu

Copy link
Copy Markdown
Member

Description

This PR adds an agent::stop_grace_period config option controlling how long the Supervisor waits for the Collector to exit after a graceful shutdown signal before forcibly killing it. It defaults to 10s, and NewCommander falls back to the default when unset.

Link to tracking issue

This is a follow - up PR for #50000. Specifically this comment.

Testing

Tuned.

Documentation

Tuned.

Authorship

  • I, a human, wrote this pull request description myself.

Signed-off-by: singhvibhanshu <find.vibhanshu@gmail.com>

func NewCommander(logger *zap.Logger, logFilePath string, cfg config.Agent, args ...string) (*Commander, error) {
stopGracePeriod := cfg.StopGracePeriod
if stopGracePeriod <= 0 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validate allows a user to set the grace period to 0. However, this will convert 0 into 10s (the default). Should 0 mean no grace period?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants