Bridge: fixed relayer version metric value (#4492)
Before relayer crates have been moved + merged, the `MetricsParams` type has been created from a `substrate-relay` crate (binary) and hence it has been setting the `substrate_relay_build_info` metic value properly - to the binary version. Now it is created from the `substrate-relay-helper` crate, which has the fixed (it isn't published) version `0.1.0`, so our relay provides incorrect metric value. This 'breaks' our monitoring tools - we see that all relayers have that incorrect version, which is not cool. The idea is to have a global static variable (shame on me) that is initialized by the binary during initialization like we do with the logger initialization already. Was considering some alternative options: - adding a separate argument to every relayer subcommand and propagating it to the `MetricsParams::new()` causes a lot of changes and introduces even more noise to the binary code, which is supposed to be as small as possible in the new design. But...
parent
f86f2131
Pipeline
#475587
waiting for manual action
with stages
in
1 hour, 33 minutes, and 54 seconds
Stage:
Stage:
Stage:
Stage:
Stage:
Stage:
Stage:
Showing
- Cargo.lock 1 addition, 0 deletionsCargo.lock
- bridges/relays/lib-substrate-relay/src/cli/mod.rs 6 additions, 7 deletionsbridges/relays/lib-substrate-relay/src/cli/mod.rs
- bridges/relays/utils/Cargo.toml 1 addition, 0 deletionsbridges/relays/utils/Cargo.toml
- bridges/relays/utils/src/initialize.rs 5 additions, 0 deletionsbridges/relays/utils/src/initialize.rs
Please register or sign in to comment