smfrpc / smf

Fastest RPC in the west
http://smfrpc.github.io/smf/
Other
721 stars 67 forks source link

seastar::metrics::double_registration #365

Open laomd opened 4 years ago

laomd commented 4 years ago

Describe the bug "seastar::metrics::double_registration: registering metrics twice for metrics: smf::rpc_server_active_connections" when run several rpc servers at the same time.

To Reproduce for (int i = 0; i < 10; i++) { smf::rpc_server_args opts; opts.rpc_port = ports[i]; auto server = seastar::make_shared\<smf::rpc_server>(opts); ... }

To Fix make metric name unique for each server, for example, "smf::rpc_server(" + args.ip + ":" + seastar::to_sstring(args.rpc_port) + ")" instead of "smf::rpc_server" only.

emaxerrno commented 4 years ago

@laomd great idea!

emaxerrno commented 4 years ago

i think we could have an optional server tag that the user can override.