Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new metrics requested by operators #2182

Merged
merged 31 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b2bf490
Add metric for number of WS reconnections
romac May 3, 2022
bbd4197
Reformatting
romac May 3, 2022
fe54a90
Add metric for number of IBC events received over WebSocket
romac May 3, 2022
5f35129
Add missing doc comments
romac May 3, 2022
08fe032
Add metric for number of messages submitted to a chain
romac May 3, 2022
c885d1e
Add facility for querying an account's balance via the bank module
romac May 4, 2022
a4db8e5
Code reorganization
romac May 4, 2022
0d15e95
Move `query_balance` to `ChainEndpoint`
romac May 4, 2022
2afafd4
Add `wallet_balance` metric
romac May 4, 2022
71471a4
Add `query_balance` to the chain handle
romac May 4, 2022
6892327
Update parameter name
romac May 5, 2022
f516c9d
Add wallet worker to monitor wallet balance and populate correspondin…
romac May 10, 2022
71f5420
Update bank proto
romac May 11, 2022
76adc3a
Implement `tx_latency` metric
romac May 11, 2022
263eb5d
Use `moka::sync::Cache` to capture in-flight txs in the telemetry sta…
romac May 12, 2022
670a187
Use short UUID
romac May 12, 2022
a6eb59f
Rename `tx_latency` to `tx_latency_confirmed` and add `tx_latency_sub…
romac May 12, 2022
787431e
Remove useless clone
romac May 12, 2022
7be0dc1
Add more labels to `tx_latency_*` metrics
romac May 12, 2022
e525576
Fix for rebase on master
romac May 12, 2022
b51bb46
Update guide with new metrics
romac May 13, 2022
60933be
Add changelog entry
romac May 13, 2022
66ad0c2
Do not add tracking id as label to tx_latency metrics to avoid blowin…
romac May 13, 2022
800f73b
Use custom aggregator to properly report wallet balance metric
romac May 16, 2022
c2b52ea
Update guide metrics
romac May 16, 2022
907d41a
Merge branch 'master' into romac/2112-telemetry
romac May 16, 2022
a07d836
Document `TrackingId`
romac May 17, 2022
a35a79a
Rename constructors of `TrackingId`
romac May 17, 2022
2d3a34d
Turn comments into doc comments
romac May 17, 2022
ef9db39
Merge branch 'master' into romac/2112-telemetry
romac May 17, 2022
684d1c3
Rename `chain::tx` module to `chain::tracking`
romac May 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Rename chain::tx module to chain::tracking
  • Loading branch information
romac committed May 17, 2022
commit 684d1c360fad939b49c0b55f0bf6939904ec5165
4 changes: 2 additions & 2 deletions relayer/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ use crate::keyring::{KeyEntry, KeyRing};
use crate::light_client::LightClient;

use self::client::ClientSettings;
use self::tx::TrackedMsgs;
use self::tracking::TrackedMsgs;

pub mod client;
pub mod cosmos;
pub mod counterparty;
pub mod handle;
pub mod runtime;
pub mod tx;
pub mod tracking;

#[cfg(test)]
pub mod mock;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ use crate::chain::cosmos::query::{abci_query, fetch_version_specs, packet_query}
use crate::chain::cosmos::types::account::Account;
use crate::chain::cosmos::types::config::TxConfig;
use crate::chain::cosmos::types::gas::{default_gas_from_config, max_gas_from_config};
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::{ChainEndpoint, HealthCheck};
use crate::chain::{ChainStatus, QueryResponse};
use crate::config::ChainConfig;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use crate::{
};

use super::client::ClientSettings;
use super::tx::TrackedMsgs;
use super::tracking::TrackedMsgs;
use super::{ChainStatus, HealthCheck};

mod base;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/handle/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use ibc_proto::ibc::core::connection::v1::QueryConnectionsRequest;

use crate::{
account::Balance,
chain::{client::ClientSettings, tx::TrackedMsgs, ChainStatus},
chain::{client::ClientSettings, tracking::TrackedMsgs, ChainStatus},
config::ChainConfig,
connection::ConnectionMsgType,
error::Error,
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/handle/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use crate::account::Balance;
use crate::cache::{Cache, CacheStatus};
use crate::chain::client::ClientSettings;
use crate::chain::handle::{ChainHandle, ChainRequest, Subscription};
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::{ChainStatus, HealthCheck};
use crate::config::ChainConfig;
use crate::error::Error;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/handle/counting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use tracing::debug;
use crate::account::Balance;
use crate::chain::client::ClientSettings;
use crate::chain::handle::{ChainHandle, ChainRequest, Subscription};
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::{ChainStatus, HealthCheck};
use crate::config::ChainConfig;
use crate::error::Error;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use crate::keyring::{KeyEntry, KeyRing};
use crate::light_client::Verified;
use crate::light_client::{mock::LightClient as MockLightClient, LightClient};

use super::tx::TrackedMsgs;
use super::tracking::TrackedMsgs;
use super::HealthCheck;

/// The representation of a mocked chain as the relayer sees it.
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/chain/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ use crate::{

use super::{
handle::{ChainHandle, ChainRequest, ReplyTo, Subscription},
tx::TrackedMsgs,
tracking::TrackedMsgs,
ChainEndpoint, HealthCheck,
};

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion relayer/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use ibc_proto::ibc::core::channel::v1::QueryConnectionChannelsRequest;

use crate::chain::counterparty::{channel_connection_client, channel_state_on_destination};
use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::connection::Connection;
use crate::foreign_client::{ForeignClient, HasExpiredOrFrozenError};
use crate::object::Channel as WorkerChannelObject;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/connection.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use core::time::Duration;

use crate::chain::counterparty::connection_state_on_destination;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::util::retry::RetryResult;
use flex_error::define_error;
use ibc_proto::google::protobuf::Any;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/event/monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use ibc::{
};

use crate::{
chain::tx::TrackingId,
chain::tracking::TrackingId,
telemetry,
util::{
retry::{retry_count, retry_with_index, RetryResult},
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/foreign_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use ibc_proto::ibc::core::client::v1::QueryConsensusStatesRequest;

use crate::chain::client::ClientSettings;
use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::error::Error as RelayerError;

const MAX_MISBEHAVIOUR_CHECK_DURATION: Duration = Duration::from_secs(120);
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/link/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use ibc::Height;

use crate::chain::counterparty::{unreceived_acknowledgements, unreceived_packets};
use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackingId;
use crate::chain::tracking::TrackingId;
use crate::link::error::LinkError;
use crate::link::operational_data::{OperationalData, TrackedEvents};
use crate::link::packet_events::{
Expand Down
4 changes: 2 additions & 2 deletions relayer/src/link/operational_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use ibc::events::IbcEvent;
use ibc::Height;

use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tx::TrackingId;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::tracking::TrackingId;
use crate::link::error::LinkError;
use crate::link::RelayPath;

Expand Down
2 changes: 1 addition & 1 deletion relayer/src/link/pending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use ibc::core::ics24_host::identifier::{ChainId, ChannelId, PortId};
use ibc::events::IbcEvent;
use ibc::query::{QueryTxHash, QueryTxRequest};

use crate::chain::tx::TrackingId;
use crate::chain::tracking::TrackingId;
use crate::error::Error as RelayerError;
use crate::link::{error::LinkError, RelayPath};
use crate::telemetry;
Expand Down
4 changes: 2 additions & 2 deletions relayer/src/link/relay_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use ibc_proto::ibc::core::channel::v1::{

use crate::chain::counterparty::{unreceived_acknowledgements, unreceived_packets};
use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tx::TrackingId;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::tracking::TrackingId;
use crate::chain::ChainStatus;
use crate::channel::error::ChannelError;
use crate::channel::Channel;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/link/relay_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::info;
use ibc::events::{IbcEvent, PrettyEvents};

use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::link::error::LinkError;
use crate::link::RelaySummary;

Expand Down
2 changes: 1 addition & 1 deletion relayer/src/supervisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use ibc::{
};

use crate::{
chain::{handle::ChainHandle, tx::TrackingId, HealthCheck},
chain::{handle::ChainHandle, tracking::TrackingId, HealthCheck},
config::Config,
event::monitor::{self, Error as EventError, ErrorDetail as EventErrorDetail, EventBatch},
object::Object,
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use ibc_proto::google::protobuf::Any;
use uint::FromStrRadixErr;

use crate::chain::handle::ChainHandle;
use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::ChainStatus;
use crate::error::Error;
use crate::util::bigint::U256;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/upgrade_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use ibc_proto::cosmos::upgrade::v1beta1::Plan;
use ibc_proto::google::protobuf::Any;
use ibc_proto::ibc::core::client::v1::UpgradeProposal;

use crate::chain::tx::TrackedMsgs;
use crate::chain::tracking::TrackedMsgs;
use crate::chain::{ChainEndpoint, CosmosSdkChain};
use crate::config::ChainConfig;
use crate::error::Error;
Expand Down
2 changes: 1 addition & 1 deletion relayer/src/worker/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use ibc::{
Height,
};

use crate::chain::tx::TrackingId;
use crate::chain::tracking::TrackingId;
use crate::util::lock::{LockExt, RwArc};
use crate::util::task::TaskHandle;
use crate::{event::monitor::EventBatch, object::Object};
Expand Down
2 changes: 1 addition & 1 deletion tools/test-framework/src/relayer/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ use ibc_proto::ibc::core::connection::v1::QueryConnectionsRequest;
use ibc_relayer::account::Balance;
use ibc_relayer::chain::client::ClientSettings;
use ibc_relayer::chain::handle::{ChainHandle, ChainRequest, Subscription};
use ibc_relayer::chain::tx::TrackedMsgs;
use ibc_relayer::chain::tracking::TrackedMsgs;
use ibc_relayer::chain::{ChainStatus, HealthCheck};
use ibc_relayer::config::ChainConfig;
use ibc_relayer::error::Error;
Expand Down