Skip to content

[Chore]: Replace global logger with local logger instances #4#43973

Merged
khushijain21 merged 16 commits intoelastic:mainfrom
khushijain21:locallogger-4
Apr 24, 2025
Merged

[Chore]: Replace global logger with local logger instances #4#43973
khushijain21 merged 16 commits intoelastic:mainfrom
khushijain21:locallogger-4

Conversation

@khushijain21
Copy link
Copy Markdown
Contributor

@khushijain21 khushijain21 commented Apr 17, 2025

Proposed commit message

This PR replaces usage of global loggers with local logger instances (in metricbeat)

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.

Related issues

@khushijain21 khushijain21 requested review from a team as code owners April 17, 2025 09:04
@khushijain21 khushijain21 requested review from mauri870 and rdner April 17, 2025 09:04
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 17, 2025
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 17, 2025

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @khushijain21? 🙏.
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.

@khushijain21 khushijain21 added the Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team label Apr 17, 2025
@elasticmachine
Copy link
Copy Markdown
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 Apr 17, 2025
@khushijain21 khushijain21 added needs_team Indicates that the issue/PR needs a Team:* label Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team labels Apr 17, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 17, 2025
@khushijain21 khushijain21 added needs_team Indicates that the issue/PR needs a Team:* label Team:Monitoring Stack Monitoring team labels Apr 17, 2025
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 17, 2025
@khushijain21 khushijain21 requested a review from a team as a code owner April 17, 2025 09:39
@khushijain21 khushijain21 added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Apr 17, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@khushijain21
Copy link
Copy Markdown
Contributor Author

/test

@khushijain21
Copy link
Copy Markdown
Contributor Author

@consulthys
Copy link
Copy Markdown
Contributor

cc [...] @consulthys

I'll let @pickypg weigh in on this change

@khushijain21
Copy link
Copy Markdown
Contributor Author

/test

@khushijain21 khushijain21 requested a review from rdner April 23, 2025 07:58
Copy link
Copy Markdown
Member

@rdner rdner left a comment

Choose a reason for hiding this comment

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

Looks good to me now.

Copy link
Copy Markdown
Member

@ishleenk17 ishleenk17 left a comment

Choose a reason for hiding this comment

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

Looks good, once CI passes

@rdner
Copy link
Copy Markdown
Member

rdner commented Apr 23, 2025

@elastic/stack-monitoring @elastic/obs-ds-hosted-services can we get final reviews, please?

@pierrehilbert
Copy link
Copy Markdown
Contributor

cc @bturquet @consulthys

Copy link
Copy Markdown
Member

@pickypg pickypg left a comment

Choose a reason for hiding this comment

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

LGT Stack Monitoring

@rdner
Copy link
Copy Markdown
Member

rdner commented Apr 24, 2025

The CI is green except some linter issues. I'd rather keep this PR focused on the logger change without addressing the linter issues.

@khushijain21 I think we're ready to merge now.

@khushijain21 khushijain21 merged commit 5dda76d into elastic:main Apr 24, 2025
186 of 189 checks passed
@khushijain21 khushijain21 added the backport-8.19 Automated backport to the 8.19 branch label Jun 9, 2025
mergify bot pushed a commit that referenced this pull request Jun 9, 2025
* [Chore]: Replace global logger with local logger instances #4

(cherry picked from commit 5dda76d)

# Conflicts:
#	libbeat/monitoring/inputmon/input_test.go
khushijain21 added a commit that referenced this pull request Jun 12, 2025
* [Chore]: Replace global logger with local logger instances #4
khushijain21 pushed a commit that referenced this pull request Jun 12, 2025
…ger instances #4 (#44706)

* [Chore]: Replace global logger with local logger instances #4 (#43973)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-8.19 Automated backport to the 8.19 branch Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Monitoring Stack Monitoring team Team:obs-ds-hosted-services Label for the Observability Hosted Services team Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants