beats icon indicating copy to clipboard operation
beats copied to clipboard

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

Open mergify[bot] opened this issue 6 months ago • 7 comments

Proposed commit message

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

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] 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

  • Part of https://github.com/elastic/ingest-dev/issues/5202
  • For https://github.com/elastic/ingest-dev/issues/5251
    This is an automatic backport of pull request #44107 done by Mergify.

mergify[bot] avatar Jun 12 '25 11:06 mergify[bot]

Cherry-pick of 11713f01ac213eec5ea2017059a4f79ef41d0afb 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

mergify[bot] avatar Jun 12 '25 11:06 mergify[bot]

Pinging @elastic/integrations (Team:Integrations)

elasticmachine avatar Jun 12 '25 11:06 elasticmachine

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

elasticmachine avatar Jun 12 '25 11:06 elasticmachine

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

mergify[bot] avatar Jun 16 '25 04:06 mergify[bot]

Looks like linter is complaining?

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

khushijain21 avatar Jun 18 '25 09:06 khushijain21

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

mergify[bot] avatar Jun 19 '25 01:06 mergify[bot]

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

mergify[bot] avatar Jun 23 '25 04:06 mergify[bot]

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

mergify[bot] avatar Jun 30 '25 04:06 mergify[bot]

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

mergify[bot] avatar Jul 07 '25 04:07 mergify[bot]