Migrate remaining metrics global references to use Beat-level Monitoring
https://github.com/elastic/beats/pull/44452 adds a self-contained Monitoring struct to each beat, replacing previous process-level globals and implicit string-keyed registries with explicit fields and accessors, and migrates many calls to the metrics API. However, some calls to the old global API require additional work to migrate, mostly because they occur in package initializers and similar, before the Beat struct exists. This issue lists the metrics that still need to be migrated. Metrics listed here will not work correctly in Beat Receiver (OTel) mode until they are migrated.
Some of the listed metrics may not need to be migrated; for example, the Kafka output will not be used in Beat Receiver mode, and thus there is no functional harm in leaving its metrics unchanged (it just blocks us from deleting the globals when the rest of the migration is complete). The same might be true of some processor metrics.
Global ("stats") metrics
- [ ] auditd.*
- [ ] filebeat.harvester.*
- [ ] filebeat.inputs.kafka.*
- [ ] heartbeat.*
- [ ] kafka output: libbeat.outputs.{read.bytes, write.bytes, write.latency, kafka.requests-in-flight}
- [ ] processor.add_host_metadata.fqdn_lookup_failed
- [ ] processor.dns.*
- [ ] processor.rate_limit.*
- [ ] processor.javascript.*
- [ ] processor.syslog.*
- [ ] process@quark.*
- [ ] processor.add_session_metadata.processdb.*
- [ ] processor.add_session_metadata.kernel_tracing.*
State registry metrics
- [ ] input.{count, names} (filebeat)
- [ ] module.{count, names} (filebeat, metricbeat)
- [ ] heartbeat.*
Input ("dataset") metrics
- [ ] [harvester UUID].* (filebeat log input)
- All Filebeat inputs that use the old
inputmonAPI instead of the metrics registry provided in the input context (migration of this case is usually very easy), including:- [ ] tcp
- [ ] udp
- [ ] unix
- [ ] awscloudwatch
- [ ] awss3
- [ ] azureblobstorage
- [ ] azureeventhub
- [ ] cel
- [ ] entityanalytics
- [ ] gcppubsub
- [ ] gcs
- [ ] http_endpoint
- [ ] httpjson
- [ ] lumberjack
- [ ] streaming
- [ ] unifiedlogs
- [ ] Some packetbeat TCP / UDP metrics reported via
inputmon.NewInputRegistry.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)