Skip to content

filebeat: remove usages of inputmon.NewInputRegistry #43862

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

AndersonQ
Copy link
Member

@AndersonQ AndersonQ commented Apr 11, 2025

Proposed commit message

filebeat: remove usages of inputmon.NewInputRegistry

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

  • N/A

How to test this PR locally

  • Run the affected inputs
  • ensure they still reporting the same metrics

Related issues

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 11, 2025
Copy link
Contributor

mergify bot commented Apr 11, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @AndersonQ? 🙏.
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
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@AndersonQ AndersonQ force-pushed the 43860-remove-inputmon-NewInputRegistry branch from 49c4b20 to 3009090 Compare April 11, 2025 13:22
@AndersonQ AndersonQ added release-note:skip The PR should be ignored when processing the changelog Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-8.x Automated backport to the 8.x branch with mergify labels Apr 11, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 11, 2025
@AndersonQ AndersonQ requested a review from Copilot April 11, 2025 13:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 57 out of 58 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • CHANGELOG-developer.next.asciidoc: Language not supported
Comments suppressed due to low confidence (4)

x-pack/filebeat/input/awss3/metrics.go:79

  • The un-register call has been removed from the Close() method; please verify that metrics registry cleanup is handled elsewhere to prevent any resource leaks.
m.unregister()

filebeat/input/unix/input.go:144

  • Ensure that the v2.Context passed to newInputMetrics includes a valid non-empty ID so that the metrics are properly initialized and not returned as nil.
if ctx.ID == "" {

filebeat/input/netmetrics/udp.go:57

  • Confirm that the v2.Context provided to NewUDP includes a non-empty ID to guarantee that the metricset is created as expected.
if ctx.ID == "" {

filebeat/input/netmetrics/tcp.go:55

  • Make sure the v2.Context passed to NewTCP contains a valid ID to prevent the metrics from being nil and to ensure proper runtime behavior.
if ctx.ID == "" {

@AndersonQ AndersonQ force-pushed the 43860-remove-inputmon-NewInputRegistry branch 4 times, most recently from 9aaafd3 to 766ced4 Compare April 14, 2025 08:42
@AndersonQ AndersonQ force-pushed the 43860-remove-inputmon-NewInputRegistry branch from 58f36f1 to fc8ad51 Compare April 16, 2025 12:23
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 release-note:skip The PR should be ignored when processing the changelog 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.

[Filebeat] remove usages of inputmon.NewInputRegistry
1 participant