Report the network PeerId to the telemetry (#1835)

* Report the network PeerId to the telemetry

* Fix accidental paste
This commit is contained in:
Pierre Krieger
2019-02-21 10:03:47 +01:00
committed by Gav Wood
parent 8a3f52bdd8
commit f5ba8a2ad9
2 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -271,6 +271,7 @@ impl<Components: components::Components> Service<Components> {
// Telemetry
let telemetry = config.telemetry_url.clone().map(|url| {
let is_authority = config.roles == Roles::AUTHORITY;
let network_id = network.local_peer_id().to_base58();
let pubkey = format!("{}", public_key);
let name = config.name.clone();
let impl_name = config.impl_name.to_owned();
@@ -286,7 +287,8 @@ impl<Components: components::Components> Service<Components> {
"config" => "",
"chain" => chain_name.clone(),
"pubkey" => &pubkey,
"authority" => is_authority
"authority" => is_authority,
"network_id" => network_id.clone()
);
}),
}))