Skip to content

Conversation

@leehinman
Copy link
Contributor

Proposed commit message

This PR adds a new function NewBeatReceiver to instantiate a beat as an otel receiver. The code is similar to the createBeater and configure functions. It is separate to so that understanding of tel receivers doesn't leak into to existing Beat setup. This also makes it much safer to change the receiver setup without breaking the traditional beat setup.

Checklist

  • 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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

None

Author's Checklist

  • [ ]

How to test this PR locally

Integration tests will catch if this change breaks regular beats instantiation. When receivers are added that will test that the new function works correctly.

Related issues

Use cases

Screenshots

Logs

@leehinman leehinman requested review from a team as code owners September 13, 2024 14:57
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 13, 2024
@leehinman leehinman added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Sep 13, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 13, 2024
@mergify
Copy link
Contributor

mergify bot commented Sep 13, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @leehinman? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

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

@mergify
Copy link
Contributor

mergify bot commented Sep 13, 2024

backport-8.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 Sep 13, 2024
@leehinman leehinman added needs_team Indicates that the issue/PR needs a Team:* label backport-skip Skip notification from the automated backport with mergify and removed backport-8.x Automated backport to the 8.x branch with mergify labels Sep 13, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 13, 2024
@botelastic
Copy link

botelastic bot commented Sep 13, 2024

This pull request doesn't have a Team:<team> label.

@leehinman leehinman force-pushed the 40659_refactor_beat_instatiation branch from 510b9ed to 6fd0fee Compare September 13, 2024 15:23
@leehinman leehinman force-pushed the 40659_refactor_beat_instatiation branch from 6fd0fee to e44e465 Compare September 16, 2024 19:13
@leehinman leehinman force-pushed the 40659_refactor_beat_instatiation branch from e44e465 to 60eaeee Compare September 16, 2024 19:34
Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

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

I like this, thanks! I would like to make sure we have a test that creates a beat receiver with this method eventually, but I also recognize that requires a lot of work we haven't done yet.

@leehinman leehinman merged commit 8feb181 into elastic:main Sep 18, 2024
@leehinman leehinman added backport-8.x Automated backport to the 8.x branch with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Sep 18, 2024
mergify bot pushed a commit that referenced this pull request Sep 18, 2024
* Add NewBeatReceiver function for beats as otel receivers

(cherry picked from commit 8feb181)
pierrehilbert pushed a commit that referenced this pull request Sep 19, 2024
…0891)

* Add NewBeatReceiver function for beats as otel receivers

(cherry picked from commit 8feb181)

Co-authored-by: Lee E Hinman <[email protected]>
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
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 Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor Beat instantiation and setup

5 participants