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

add initial discovery mode #2195

Merged
merged 2 commits into from
Nov 2, 2022
Merged

add initial discovery mode #2195

merged 2 commits into from
Nov 2, 2022

Conversation

rmfitzpatrick
Copy link
Contributor

These changes add new --discovery and --dry-run cmdline options to run a limited preflight collector service using any .discovery.yaml receivers and observers from the config directory and embed them into an internal discovery receiver instance whose successful status logs lead to injecting the discovered receivers into a receiver creator for the final config. If --dry-run is set, then the final config will be written to stdout before exiting instead of running the service.

Along with this new functionality, a new common internal discovery package is being added to avoid repeated logic in addition to new config server testutils collector container helpers to load the initial and effective configs.

@rmfitzpatrick rmfitzpatrick requested review from a team as code owners October 31, 2022 17:02
@@ -166,7 +164,7 @@ func (d *discoveryReceiver) consumerLoop(loopStarted *sync.WaitGroup) {
func (d *discoveryReceiver) createAndSetReceiverCreator() error {
receiverCreatorFactory, receiverCreatorConfig, err := d.config.receiverCreatorFactoryAndConfig(d.endpointTracker.correlations)
if err != nil {
return nil
return err
Copy link
Contributor Author

Choose a reason for hiding this comment

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

☹️

internal/confmapprovider/discovery/discoverer.go Outdated Show resolved Hide resolved
internal/confmapprovider/discovery/discoverer.go Outdated Show resolved Hide resolved
internal/confmapprovider/discovery/discoverer.go Outdated Show resolved Hide resolved
internal/confmapprovider/discovery/discoverer.go Outdated Show resolved Hide resolved
@rmfitzpatrick rmfitzpatrick force-pushed the discoverymodeinitial branch 2 times, most recently from a8c6258 to ce5a2b0 Compare October 31, 2022 21:40
@rmfitzpatrick rmfitzpatrick merged commit 06f4bd8 into main Nov 2, 2022
@delete-merged-branch delete-merged-branch bot deleted the discoverymodeinitial branch November 2, 2022 16:56
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