refactor(metrics): delete influxdb storage for metrics#6725
Open
317787106 wants to merge 5 commits intotronprotocol:developfrom
Open
refactor(metrics): delete influxdb storage for metrics#6725317787106 wants to merge 5 commits intotronprotocol:developfrom
317787106 wants to merge 5 commits intotronprotocol:developfrom
Conversation
Sunny6889
reviewed
May 5, 2026
Contributor
Sunny6889
left a comment
There was a problem hiding this comment.
[Discussion] Suggestion: warn operators about legacy InfluxDB keys
HOCON silently ignores unknown keys, so anyone with node.metrics.storageEnable = true (or node.metrics.influxdb.*) in their config will upgrade cleanly and then watch their metrics pipeline go dark with no signal as to why. The default is false, so the affected user count is small, but for those who did enable it the failure mode is bad: silent loss of monitoring on a production node.
A one-shot startup warning costs ~10 lines and turns a silent regression into an actionable log line. Sketch:
private static void warnOnLegacyInfluxdbKeys(Config config) {
String[] legacy = {
"node.metrics.storageEnable",
"node.metrics.influxdb.ip",
"node.metrics.influxdb.port",
"node.metrics.influxdb.database",
"node.metrics.influxdb.metricsReportInterval",
};
for (String key : legacy) {
if (config.hasPath(key)) {
logger.warn("Config key '{}' is no longer supported; the InfluxDB metrics "
+ "backend was removed in v4.8.2 and the value is being ignored. "
+ "Migrate to Prometheus: "
+ "https://github.com/tronprotocol/tron-docker/tree/develop/metric_monitor",
key);
}
}
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 #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 (excludes node.metrics) 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.