[8.19] (backport #10087) Fall back to process runtime if otel runtime is unsupported #10166
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.
What does this PR do?
Makes inputs use the process runtime if they're configured to use the otel runtime, and the latter cannot support them. Currently there are two possible reasons for this:
allow_older_versions: false
for the elasticsearch output for example.A log line is also emitted if this happens.
I've also moved the component monitoring code into its own package to avoid dependency cycles.
Why is it important?
We want to enable the otel runtime progressively without ever breaking a user's working setup. This means that a fallback is necessary, even if it may involve going against the explicit configuration. Later, we may add a flag which causes this to be an error instead.
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files[ ] I have added an entry in./changelog/fragments
using the changelog toolHow to test this PR locally
Build the agent package and run it locally with either an elasticsearch output using an unsupported option (this PR uses
allow_older_versions: false
), or a kafka or logstash output. Then look at the status and logs. You should see a log line warning that your input was switched to the process runtime.Related issues
Questions to ask yourself
This is an automatic backport of pull request #10087 done by [Mergify](https://mergify.com).