refactor(metrics): delete influxdb storage for metrics#73
Conversation
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis pull request removes InfluxDB metrics storage integration from java-tron, eliminating associated configuration parameters, dependencies, and initialization logic. Prometheus metrics remain as the standardized monitoring interface. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4d0eb4e to
20c0de8
Compare
What does this PR do?
Removes InfluxDB as a metrics storage backend, along with all related configuration, dependencies, and code. Prometheus remains as the sole monitoring interface.
Closes tronprotocol#6665.
Why are these changes required?
java-tron currently maintains two parallel monitoring systems: Prometheus (
org.tron.common.prometheus) and MetricsUtil + InfluxDB (org.tron.core.metrics.MetricsUtil). Keeping both creates fragmented metric definitions, duplicated maintenance, and operational overhead. InfluxDB support has the following specific drawbacks:Prometheus, combined with tron-docker, provides a production-ready monitoring solution that supersedes InfluxDB for all known use cases.
Changes:
framework/build.gradle: Removedcom.github.davidb:metrics-influxdb:0.8.2dependency.MetricsUtil: Deleted theinit()method and all InfluxDB reporter logic (InfluxdbReporter,InfluxdbProtocols).ApplicationImpl: RemovedMetricsUtil.init()call fromstartup().CommonParameter: RemovedmetricsStorageEnable,influxDbIp,influxDbPort,influxDbDatabase, andmetricsReportIntervalfields.Args: RemovedinitRocksDbBackupProperty-style parsing of allMETRICS_INFLUXDB_*andMETRICS_STORAGE_ENABLEconfig keys.ConfigKey: RemovedMETRICS_STORAGE_ENABLE,METRICS_INFLUXDB_IP,METRICS_INFLUXDB_PORT,METRICS_INFLUXDB_DATABASE,METRICS_REPORT_INTERVALconstants.config.conf: Removed thestorageEnableandinfluxdb { ... }block fromnode.metrics.ParameterTest: Removed assertions for the deleted InfluxDB parameter fields.Configuration change: The following config block is no longer read and should be removed from node config files:
This PR has been tested by:
Follow up
Operators currently using InfluxDB for metrics should migrate to Prometheus. The tron-docker metric_monitor provides a ready-to-use Prometheus + Grafana setup.
Extra details
The
/wallet/monitor/getstatsinfoHTTP endpoint remains available as an auxiliary interface (served byMetricsUtilcounters/meters/histograms via dropwizard metrics-core), but it is no longer the recommended primary monitoring path.Summary by CodeRabbit