Skip to content

[9.0](backport #6697) Add ability to run components in the Otel manager#7861

Merged
ycombinator merged 1 commit into9.0from
mergify/bp/9.0/pr-6697
Apr 16, 2025
Merged

[9.0](backport #6697) Add ability to run components in the Otel manager#7861
ycombinator merged 1 commit into9.0from
mergify/bp/9.0/pr-6697

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Apr 15, 2025

What does this PR do?

Allows to run components in the Otel manager instead of the runtime manager. Currently, only filestream is supported. This implements option 2 from https://github.com/elastic/ingest-dev/issues/4931.

Some notes about the implementation:

  • We use the same otel collector as hybrid mode. We add a prefix to each component and pipeline name in an effort to avoid conflicts.
  • The Otel configuration is generated from the component model agent already uses for beats processes. It is easier to manipulate and lets us emit the same status information in the future.
  • This behaviour is controlled by a single attribute of the Coordinator, the only way to enable it is by changing the code. This is a temporary measure until we decide what feature flags we want for it.
  • Status reporting uses the otel collector status, and doesn't try to be compatible with beats processes status.
  • Which input types are supported is hardcoded.

Why is it important?

This is a preprequisite for migrating to Otel within agent, which is our long-term plan. In the short-term, it will make it easier for us to run tests.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an integration test or an E2E test

How to test this PR locally

  1. Change the boolean value in
    runComponentsInOtelManager: false, // change this to run supported components in the Otel manager
  2. Build an agent package
  3. Run agent with a configuration containing a filestream input

Related issues


This is an automatic backport of pull request #6697 done by [Mergify](https://mergify.com).

@mergify mergify bot requested a review from a team as a code owner April 15, 2025 20:47
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Apr 15, 2025
@mergify mergify bot requested review from michel-laterman and swiatekm and removed request for a team April 15, 2025 20:47
@mergify
Copy link
Contributor Author

mergify bot commented Apr 15, 2025

Cherry-pick of eeffc0e has failed:

On branch mergify/bp/9.0/pr-6697
Your branch is up to date with 'origin/9.0'.

You are currently cherry-picking commit eeffc0e5a.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   internal/pkg/agent/application/coordinator/coordinator.go
	modified:   internal/pkg/agent/application/coordinator/coordinator_unit_test.go
	modified:   internal/pkg/agent/application/upgrade/upgrade.go
	new file:   internal/pkg/otel/configtranslate/otelconfig.go
	new file:   internal/pkg/otel/configtranslate/otelconfig_test.go
	modified:   pkg/component/runtime/command.go
	modified:   pkg/component/runtime/runtime_comm.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   NOTICE.txt
	both modified:   go.mod

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

@github-actions github-actions bot added Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team skip-changelog labels Apr 15, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

ycombinator
ycombinator previously approved these changes Apr 15, 2025
* Add ability to run components in the Otel manager

* Add coordinator test

* Set metricbeat receiver signal type to logs

* Drop unnecessary transform processor

The conversion now happens in the otel consumer in beats.

* Determine default datastream type from beat name

* Fix diagnostics tests

* Promote output queue settings to receivers

* Move otel config translation to the otel package

* Emit the otel component diagnostic conditionally

* Add more otel config translation tests

* Code review fixes

* Fix diagnostics tests

* Code Review fixes

* Correctly set input types if not present

* More code review fixes

(cherry picked from commit eeffc0e)
@swiatekm swiatekm force-pushed the mergify/bp/9.0/pr-6697 branch from 89b8915 to 88e7750 Compare April 16, 2025 12:20
@elastic-sonarqube
Copy link

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

History

cc @swiatekm

@ycombinator ycombinator merged commit 96b6f97 into 9.0 Apr 16, 2025
12 checks passed
@ycombinator ycombinator deleted the mergify/bp/9.0/pr-6697 branch April 16, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport conflicts There is a conflict in the backported pull request skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants