Skip to content

Conversation

@swiatekm
Copy link
Contributor

@swiatekm swiatekm commented Jan 20, 2025

What does this PR do?

Run filestream inputs within the otel manager instead of the component model. This is a proof of concept of how this could work. We do a straightforward configuration translation from agent inputs and outputs to Otel receivers and exporters, and refactor configuration handling in the Coordinator to allow the configuration to either be handled by the Otel Manager or the Runtime Manager.

To Do:

  • Translate input and output configuration to Otel configuration
  • Run the Otel configuration in the Otel manager used for hybrid mode
  • Ensure inputs handled by Otel are not handled by the component model
  • Ensure statuses are as similar as possible between the otel manager and the component model
  • Inject monitoring config at a level where it can be run in Otel mode

Why is it important?

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 made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@swiatekm swiatekm added the enhancement New feature or request label Jan 20, 2025
@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2025

This pull request does not have a backport label. Could you fix it @swiatekm? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label to automatically backport to the 8./d branch. /d is the digit

@mergify
Copy link
Contributor

mergify bot commented Jan 20, 2025

backport-v8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Jan 20, 2025
@swiatekm swiatekm requested a review from blakerouse January 20, 2025 14:28
@elastic-sonarqube
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
1.8% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube

if err != nil {
return nil, err
}
esExporterConfig, err := elasticsearch.ToOTelConfig(outputCfgC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mergify
Copy link
Contributor

mergify bot commented Jan 31, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b feat/filebeat-otel-receiver upstream/feat/filebeat-otel-receiver
git merge upstream/main
git push upstream feat/filebeat-otel-receiver

if err != nil {
return nil, err
}
esExporterConfig, err := elasticsearch.ToOTelConfig(outputCfgC)
Copy link
Contributor

@khushijain21 khushijain21 Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, to note that queue settings defined under outputs/[output-type] is promoted one level up by beats. The queue settings from output will have to be updated under beatsreceiver to stay consistent. For example:

filebeatreceiver:
   filebeat:
     inputs:
   output:
    otelconsumer: nil
   queue:  // queue settings coming from ES should be updated here
    mem: ....

FYI, for how it is done for beats in otel mode

// send this configuration to the otel manager.
// Always called on the main Coordinator goroutine.
func (c *Coordinator) refreshOtelComponents(cfg map[string]any) (err error) {
err = c.generateOtelComponentConfig(cfg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may also want to inject the monitoring config before we generate the OTel components

@swiatekm
Copy link
Contributor Author

swiatekm commented Feb 3, 2025

Closing in favor of #6697

@swiatekm swiatekm closed this Feb 3, 2025
@swiatekm swiatekm deleted the feat/filebeat-otel-receiver branch March 3, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.x Automated backport to the 8.x branch with mergify enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants