Skip to content

[8.19](backport #44107) [Chore] Replace global logger with local loggers in mb modules #5#44775

Merged
khushijain21 merged 22 commits into8.19from
mergify/bp/8.19/pr-44107
Jul 9, 2025
Merged

[8.19](backport #44107) [Chore] Replace global logger with local loggers in mb modules #5#44775
khushijain21 merged 22 commits into8.19from
mergify/bp/8.19/pr-44107

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Jun 12, 2025

Proposed commit message

This PR replaces global logger instances with local loggers in metricbeat modules

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

…4107)

* [Chore] Replace global logger with local loggers in mb modules #5

* fix tests

* make check

* make check

* fix tests

* make update

* fix redis integ test

* deploy on k8's

* add deps

* fix logger name for kafka

(cherry picked from commit 11713f0)

# Conflicts:
#	x-pack/metricbeat/module/awsfargate/task_stats/task_stats.go
@mergify mergify bot added the backport label Jun 12, 2025
@mergify mergify bot requested a review from a team as a code owner June 12, 2025 11:54
@mergify mergify bot added the conflicts There is a conflict in the backported pull request label Jun 12, 2025
@mergify mergify bot requested review from a team as code owners June 12, 2025 11:54
@mergify mergify bot added backport conflicts There is a conflict in the backported pull request labels Jun 12, 2025
@mergify mergify bot requested review from andrzej-stencel and faec and removed request for a team June 12, 2025 11:54
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 12, 2025

Cherry-pick of 11713f0 has failed:

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

You are currently cherry-picking commit 11713f01a.
  (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:
	new file:   filebeat/local/compare.sh
	modified:   libbeat/autodiscover/appender.go
	modified:   libbeat/autodiscover/appender_test.go
	modified:   libbeat/autodiscover/appenders/config/config.go
	modified:   libbeat/autodiscover/appenders/config/config_test.go
	modified:   metricbeat/autodiscover/appender/kubernetes/token/token.go
	modified:   metricbeat/autodiscover/appender/kubernetes/token/token_test.go
	modified:   metricbeat/module/apache/status/data.go
	modified:   metricbeat/module/apache/status/status.go
	modified:   metricbeat/module/apache/status/status_test.go
	modified:   metricbeat/module/ceph/osd_tree/data.go
	modified:   metricbeat/module/ceph/osd_tree/osd_tree.go
	modified:   metricbeat/module/ceph/pool_disk/data.go
	modified:   metricbeat/module/ceph/pool_disk/pool_disk.go
	modified:   metricbeat/module/couchbase/bucket/bucket.go
	modified:   metricbeat/module/couchbase/bucket/data.go
	modified:   metricbeat/module/couchbase/cluster/cluster.go
	modified:   metricbeat/module/couchbase/cluster/data.go
	modified:   metricbeat/module/couchbase/node/data.go
	modified:   metricbeat/module/couchbase/node/node.go
	modified:   metricbeat/module/docker/diskio/diskio.go
	modified:   metricbeat/module/docker/diskio/diskio_integration_test.go
	modified:   metricbeat/module/docker/event/event.go
	modified:   metricbeat/module/docker/memory/memory.go
	modified:   metricbeat/module/elasticsearch/cluster_stats/data_test.go
	modified:   metricbeat/module/etcd/leader/leader.go
	modified:   metricbeat/module/etcd/leader/leader_integration_test.go
	modified:   metricbeat/module/etcd/metrics/metrics_integration_test.go
	modified:   metricbeat/module/etcd/store/store_integration_test.go
	modified:   metricbeat/module/golang/expvar/expvar.go
	modified:   metricbeat/module/golang/heap/data.go
	modified:   metricbeat/module/golang/heap/heap.go
	modified:   metricbeat/module/golang/util.go
	modified:   metricbeat/module/graphite/server/server.go
	modified:   metricbeat/module/haproxy/info/info.go
	modified:   metricbeat/module/haproxy/stat/stat.go
	modified:   metricbeat/module/jolokia/jmx/config.go
	modified:   metricbeat/module/jolokia/jmx/jmx.go
	modified:   metricbeat/module/kafka/broker.go
	modified:   metricbeat/module/kafka/broker_test.go
	modified:   metricbeat/module/kafka/consumergroup/consumergroup.go
	modified:   metricbeat/module/kafka/consumergroup/query.go
	modified:   metricbeat/module/kafka/consumergroup/query_test.go
	modified:   metricbeat/module/kafka/kafka.go
	modified:   metricbeat/module/kafka/metricset.go
	modified:   metricbeat/module/kafka/partition/partition.go
	modified:   metricbeat/module/kubernetes/event/event_test.go
	modified:   metricbeat/module/kubernetes/util/kubernetes.go
	modified:   metricbeat/module/kubernetes/util/kubernetes_test.go
	modified:   metricbeat/module/kubernetes/volume/volume.go
	modified:   metricbeat/module/kubernetes/volume/volume_test.go
	modified:   metricbeat/module/linux/pageinfo/pageinfo.go
	modified:   metricbeat/module/linux/pageinfo/pageinfo_test.go
	modified:   metricbeat/module/linux/rapl/rapl.go
	modified:   metricbeat/module/logstash/node_stats/data_test.go
	modified:   metricbeat/module/munin/munin.go
	modified:   metricbeat/module/munin/munin_test.go
	modified:   metricbeat/module/munin/node/node.go
	modified:   metricbeat/module/nats/connection/connection.go
	modified:   metricbeat/module/nats/connections/connections.go
	modified:   metricbeat/module/nats/route/route.go
	modified:   metricbeat/module/nats/routes/routes.go
	modified:   metricbeat/module/nats/stats/stats.go
	modified:   metricbeat/module/nats/subscriptions/subscriptions.go
	modified:   metricbeat/module/nginx/stubstatus/stubstatus.go
	modified:   metricbeat/module/postgresql/metricset.go
	modified:   metricbeat/module/rabbitmq/metricset_test.go
	modified:   metricbeat/module/redis/info/info.go
	modified:   metricbeat/module/redis/key/key.go
	modified:   metricbeat/module/redis/keyspace/keyspace.go
	modified:   metricbeat/module/redis/redis.go
	modified:   metricbeat/module/redis/redis_integration_test.go
	modified:   metricbeat/module/system/filesystem/filesystem.go
	modified:   metricbeat/module/system/filesystem/filesystem_test.go
	modified:   metricbeat/module/system/process/process.go
	modified:   metricbeat/module/system/process/process_test.go
	modified:   metricbeat/module/system/process_summary/process_summary.go
	modified:   metricbeat/module/system/socket/socket.go

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   x-pack/metricbeat/module/awsfargate/task_stats/task_stats.go

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

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 12, 2025
@github-actions github-actions bot added Team:Integrations Label for the Integrations team Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team Team:Monitoring Stack Monitoring team labels Jun 12, 2025
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/integrations (Team:Integrations)

@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 Jun 12, 2025
…4107)

* [Chore] Replace global logger with local loggers in mb modules #5

* fix tests

* make check

* make check

* fix tests

* make update

* fix redis integ test

* deploy on k8's

* add deps

* fix logger name for kafka
@khushijain21 khushijain21 enabled auto-merge (squash) June 12, 2025 16:08
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 16, 2025

This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏

Copy link
Copy Markdown
Contributor

@andrzej-stencel andrzej-stencel left a comment

Choose a reason for hiding this comment

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

Looks like linter is complaining?

@khushijain21
Copy link
Copy Markdown
Contributor

khushijain21 commented Jun 18, 2025

Looks like linter is complaining?

That's right, I am still investigating. Not sure why host paramater is not being resolved

@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 19, 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 mergify/bp/8.19/pr-44107 upstream/mergify/bp/8.19/pr-44107
git merge upstream/8.19
git push upstream mergify/bp/8.19/pr-44107

@AndersonQ AndersonQ force-pushed the mergify/bp/8.19/pr-44107 branch from 163ac51 to a87e499 Compare June 19, 2025 10:27
@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 23, 2025

This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏

@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jun 30, 2025

This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏

@mergify
Copy link
Copy Markdown
Contributor Author

mergify bot commented Jul 7, 2025

This pull request has not been merged yet. Could you please review and merge it @khushijain21? 🙏

@khushijain21 khushijain21 merged commit ec4afed into 8.19 Jul 9, 2025
197 of 200 checks passed
@khushijain21 khushijain21 deleted the mergify/bp/8.19/pr-44107 branch July 9, 2025 11:06
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 Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team Team:Integrations Label for the Integrations team Team:Monitoring Stack Monitoring team Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants