Allow switching inputs to the otel runtime manager#7328
Conversation
b60be2f to
d238651
Compare
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
pkoutsovasilis
left a comment
There was a problem hiding this comment.
since the following is the case
This change is only intended for testing, and the configuration is not stable. See https://github.com/elastic/ingest-dev/issues/5117 for more details. Its only effect on users not opting in to using the otel runtime is that diagnostics now unconditionally emit an additional file containing the final otel collector configuration.
any reason we aren't guarding this behind a Feature Flag? cc @cmacknz
I'm not against adding an undocumented feature flag for it. I was trying to minimize the set of changes I'd potentially need to redo in the future, but a flag isn't that much work. |
a9650a9 to
88fa83b
Compare
We discussed this during a meeting today, and decided on the following:
Are you ok with this approach @pkoutsovasilis ? |
ok @swiatekm since this was discussed and agreed to be in this way, no argument on my end. Waiting for the CI to be green 🙂 |
ca54854 to
173efa6
Compare
173efa6 to
6259aec
Compare
Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co>
|
💚 Build Succeeded
History
cc @swiatekm |
* Add runtime manager field to component model * Store runtime manager value on the Component level * Support component runtime manager in coordinator * Change `runtime` to `_runtime_experimental` * Log component ids using the otel runtime * Fix integration test * Make component ordering consistent * Fix slice allocation Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> (cherry picked from commit 18d8dff)
* Add runtime manager field to component model * Store runtime manager value on the Component level * Support component runtime manager in coordinator * Change `runtime` to `_runtime_experimental` * Log component ids using the otel runtime * Fix integration test * Make component ordering consistent * Fix slice allocation Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> (cherry picked from commit 18d8dff) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>
* Add runtime manager field to component model * Store runtime manager value on the Component level * Support component runtime manager in coordinator * Change `runtime` to `_runtime_experimental` * Log component ids using the otel runtime * Fix integration test * Make component ordering consistent * Fix slice allocation Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> (cherry picked from commit 18d8dff) # Conflicts: # internal/pkg/agent/application/coordinator/coordinator.go # internal/pkg/agent/application/coordinator/coordinator_unit_test.go # testing/integration/otel_test.go
* Add runtime manager field to component model * Store runtime manager value on the Component level * Support component runtime manager in coordinator * Change `runtime` to `_runtime_experimental` * Log component ids using the otel runtime * Fix integration test * Make component ordering consistent * Fix slice allocation Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> (cherry picked from commit 18d8dff)
* Add runtime manager field to component model * Store runtime manager value on the Component level * Support component runtime manager in coordinator * Change `runtime` to `_runtime_experimental` * Log component ids using the otel runtime * Fix integration test * Make component ordering consistent * Fix slice allocation Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> (cherry picked from commit 18d8dff)
* Add runtime manager field to component model * Store runtime manager value on the Component level * Support component runtime manager in coordinator * Change `runtime` to `_runtime_experimental` * Log component ids using the otel runtime * Fix integration test * Make component ordering consistent * Fix slice allocation Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> --------- Co-authored-by: Panos Koutsovasilis <panos.koutsovasilis@elastic.co> (cherry picked from commit 18d8dff) Co-authored-by: Mikołaj Świątek <mail@mikolajswiatek.com>




What does this PR do?
Allows switching individual inputs to the Otel runtime manager. This is done by introducing a new configuration field:
_runtime_experimentalwith possible values ofprocess(the default) andotel. It is no longer necessary to modify agent code and build a local binary to run inputs as beats receivers in an otel collector.This change is only intended for testing, and the configuration is not stable. See https://github.com/elastic/ingest-dev/issues/5117 for more details. Its only effect on users not opting in to using the otel runtime is that diagnostics now unconditionally emit an additional file containing the final otel collector configuration.
In terms of implementation, we add a new field to Components in the component model, and ensure inputs with a different runtime manager setting end up in different Components.
Why is it important?
It will make testing beats receivers in agent a lot easier. The component model machinery is also easy to repurpose even if we ultimately decide this needs to be configured differently.
Checklist
How to test this PR locally
Build the agent binary and use the following configuration:
Related issues
Implements the agent part of https://github.com/elastic/ingest-dev/issues/5117. It's possible the actual config key and values will change, but the changes to the component model should be universal.