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

Refactor collector config #1885

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft

Conversation

Molter73
Copy link
Collaborator

@Molter73 Molter73 commented Oct 10, 2024

Description

  • Remove InitCollectorConfig and replace it with a proper constructor.
  • Delete default constructor.
  • Created multiple helper methods in order to split initialization of the configuration.
  • Inlined several simple getters and setters for consistency.
  • Removed static constexpr variables that could be directly applied as default value.
  • Created helper EnvVar variables to further simplify configuration handling.
  • Replaced const char*[] with std::array.

Checklist

  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

  • Manually test all changed configuration still works as expected.

@Molter73 Molter73 changed the title Mauro/refactor collector config Refactor collector config Oct 10, 2024
@Molter73 Molter73 force-pushed the mauro/refactor-collector-config branch from 4356bd1 to f5fec46 Compare October 11, 2024 09:36
Changes done:
- Remove InitCollectorConfig and replace it with a proper constructor.
- Delete default constructor.
- Created multiple helper methods in order to split initialization
  of the configuration.
- Inlined several simple getters and setters for consistency.
- Removed static constexpr variables that could be directly applied as
  default member initializers.
- Replaced const char*[] with std::array.
The heuristics may fail if the builder container is not running as
privileged, but they are also not needed for unit testing, so we can
just skip them. Normal collector operation will always execute the
heuristics.
@Molter73 Molter73 force-pushed the mauro/refactor-collector-config branch from 9ea2727 to 41627e2 Compare October 14, 2024 14:08
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.

1 participant