mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
stats: remove deprecated -statshostname
argument
This commit is contained in:
parent
a5a478fff3
commit
8a7a96c51f
@ -758,7 +758,6 @@ void SetupServerArgs(ArgsManager& argsman)
|
||||
argsman.AddArg("-statsbatchsize=<bytes>", strprintf("Specify the size of each batch of stats messages (default: %d)", DEFAULT_STATSD_BATCH_SIZE), ArgsManager::ALLOW_ANY, OptionsCategory::STATSD);
|
||||
argsman.AddArg("-statsduration=<ms>", strprintf("Specify the number of milliseconds between stats messages (default: %d)", DEFAULT_STATSD_DURATION), ArgsManager::ALLOW_ANY, OptionsCategory::STATSD);
|
||||
argsman.AddArg("-statshost=<ip>", strprintf("Specify statsd host (default: %s)", DEFAULT_STATSD_HOST), ArgsManager::ALLOW_ANY, OptionsCategory::STATSD);
|
||||
hidden_args.emplace_back("-statshostname");
|
||||
argsman.AddArg("-statsport=<port>", strprintf("Specify statsd port (default: %u)", DEFAULT_STATSD_PORT), ArgsManager::ALLOW_ANY, OptionsCategory::STATSD);
|
||||
argsman.AddArg("-statsperiod=<seconds>", strprintf("Specify the number of seconds between periodic measurements (default: %d)", DEFAULT_STATSD_PERIOD), ArgsManager::ALLOW_ANY, OptionsCategory::STATSD);
|
||||
argsman.AddArg("-statsprefix=<string>", strprintf("Specify an optional string prepended to every stats key (default: %s)", DEFAULT_STATSD_PREFIX), ArgsManager::ALLOW_ANY, OptionsCategory::STATSD);
|
||||
|
@ -43,22 +43,13 @@ std::unique_ptr<StatsdClient> InitStatsClient(const ArgsManager& args)
|
||||
return string;
|
||||
};
|
||||
|
||||
auto suffix = args.GetArg("-statssuffix", DEFAULT_STATSD_SUFFIX);
|
||||
if (suffix.empty()) {
|
||||
suffix = args.GetArg("-statshostname", DEFAULT_STATSD_SUFFIX);
|
||||
} else {
|
||||
// We restrict sanitization logic to our newly added arguments to
|
||||
// prevent breaking changes.
|
||||
sanitize_string(suffix);
|
||||
}
|
||||
|
||||
return std::make_unique<StatsdClient>(
|
||||
args.GetArg("-statshost", DEFAULT_STATSD_HOST),
|
||||
args.GetArg("-statsport", DEFAULT_STATSD_PORT),
|
||||
args.GetArg("-statsbatchsize", DEFAULT_STATSD_BATCH_SIZE),
|
||||
args.GetArg("-statsduration", DEFAULT_STATSD_DURATION),
|
||||
sanitize_string(args.GetArg("-statsprefix", DEFAULT_STATSD_PREFIX)),
|
||||
suffix
|
||||
sanitize_string(args.GetArg("-statssuffix", DEFAULT_STATSD_SUFFIX))
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user