-
Notifications
You must be signed in to change notification settings - Fork 195
[9.1] (backport #10087) Fall back to process runtime if otel runtime is unsupported #10167
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
Conversation
* Move component monitoring to its own package Agent monitoring has two separate functions - implementing the control plane monitoring server and self-monitoring for components. Having both in the same packages caused a dependency cycle involving the otel translation package. Resolve this by putting component monitoring in a subpackage * Fall back to process runtime if otel runtime is unsupported * Fix integration test * Normalize import names * Add logstash unit test * Use indices instead of allow_older_version * Add log line for skipped components * Change argument order * Fix linter warning (cherry picked from commit 2f0ba69) # Conflicts: # internal/pkg/agent/application/application.go # internal/pkg/agent/application/coordinator/coordinator.go # internal/pkg/agent/application/monitoring/process.go # internal/pkg/agent/cmd/inspect.go # internal/pkg/otel/manager/diagnostics.go # internal/pkg/otel/manager/diagnostics_test.go # internal/pkg/otel/translate/otelconfig.go # internal/pkg/otel/translate/otelconfig_test.go # testing/integration/ess/beat_receivers_test.go
Cherry-pick of 2f0ba69 has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
|
Backporting this change would require several additional backports, and is probably not worth it. Closing. |
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).