Skip to content

fix: fix whitespace typo when customizing CloudResourceDetectors #136

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
merged 3 commits into from
Dec 3, 2024

Conversation

obs-gh-mattcotter
Copy link
Collaborator

Description

fix whitespace typo when customizing CloudResourceDetectors. Before this change, the generated config was detectors:[ec2] instead of detectors: [ec2]

Checklist

  • Created tests which fail without the change (if possible)
  • Extended the README / documentation, if necessary

@@ -31,7 +31,7 @@ def run_test_docker(remote_host: u.Host, env_vars: dict) -> None:

@u.print_test_decorator
def run_test_linux(remote_host: u.Host, env_vars: dict) -> None:
init_command = "sudo observe-agent init-config --token {} --observe_url {}".format(
init_command = "sudo observe-agent init-config --token {} --observe_url {} --cloud_resource_detectors ec2".format(
Copy link
Collaborator

Choose a reason for hiding this comment

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

if i want to configure multiple detectors do i provide this flag multiple times?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you can specify multiple times or use comma separated values. I added a --print flag to illustrate this:

$ ./observe-agent init-config --print --cloud_resource_detectors gcp --cloud_resource_detectors ecs --cloud_resource_detectors 1,2,3 
# Observe data token
token: ...
# Target Observe collection url
observe_url: ...

# Debug mode - Sets agent log level to debug
debug: false

cloud_resource_detectors:
  - gcp
  - ecs
  - 1
  - 2
  - 3

# ...

@obs-gh-mattcotter obs-gh-mattcotter merged commit b33a3e8 into main Dec 3, 2024
8 checks passed
@obs-gh-mattcotter obs-gh-mattcotter deleted the mc/cloud-resource branch December 3, 2024 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants