Add operations and applier to enable an exporter #18817
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR extends the state of exporter in the dynamic config with some additional metadata for enabling an exporter. When enabling the exporter, we can optionally provide the id of another exporter from which it can initialize its metadata from. The
ExporterDirector
should use this when enabling the exporter.As discussed in the POC, there is a possibility that the exporter is disabled first, then re-enabled, then the node restarted. Since there was no snapshot in between, then restarted node will start with the exporter state before disabling. This is incorrect, because it was re-initialized with a different metadata. To allow detecting this case, we add a
metadataVersion
to the exporter state. This version is incremented everytime an exporter is enabled. TheExporterDirector
can use this info to know whether the metadata in the runtime is up-to-date or not. The initial state for an already enabled exporter during cluster bootstrap will be 0.This PR also adds the operation and applier for enabling an exporter. This follows the same approach all other configuration change operations.
Related issues
closes #18757
closes #18808