Skip to content
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

[cmd/opampsupervisor] allow configuring collector process execution #37331

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

odubajDT
Copy link
Contributor

@odubajDT odubajDT commented Jan 20, 2025

Description

Allow configuring collector process via additional parameters:

  • config_files - list of additional config files passed into the collector
  • env - map of env variables passed to the collector process
  • args - additional arguments passed to the collector process on startup

Link to tracking issue

Fixes #24324

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

c.logger.Debug("Starting agent", zap.String("agent", c.cfg.Executable))

for _, conf := range c.cfg.ConfigFiles {
fileName := filepath.Base(conf)
newPath := c.logsDir + "/" + fileName
Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on putting these configs in a sub folder called "configs" or something to keep the storage directory a bit more organized?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not sure if a separate folder/package is a good solution here, but moved it at least to a separate function and moved the more general functions to a separate package

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, I mean the location the files get moved to. If we can consider creating a new configs folder so that the supervisor's storage directory doesn't get too cluttered in the event a user is running with several configs.

@dpaasman00
Copy link
Contributor

@evan-bradley @tigrannajaryan PTAL when you're able. I think this would be a great addition and it is working well in my testing.

Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
Signed-off-by: odubajDT <[email protected]>
@odubajDT odubajDT force-pushed the opamp-process-execution branch from e272468 to 9f50081 Compare February 17, 2025 05:55
Signed-off-by: odubajDT <[email protected]>
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.

[cmd/opampsupervisor] Allow configuring Collector process execution
4 participants