Skip to content
Snippets Groups Projects
  • Svyatoslav Nikolsky's avatar
    Bridge: fixed relayer version metric value (#4492) · 2c48b9dd
    Svyatoslav Nikolsky authored
    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 I could do that if team thinks it is
    better;
    - adding a `structopt(skip) pub relayer_version: RelayerVersion`
    argument to all subcommand params won't work, because it will be
    initialized by default and `RelayerVersion` needs to reside in some util
    crate (not the binary), so it'll have the wrong value again.
    Unverified
    2c48b9dd
Code owners
Assign users and groups as approvers for specific file changes. Learn more.