pub struct TelemetryState { /* private fields */ }Implementations§
Source§impl TelemetryState
impl TelemetryState
pub fn new( tx_latency_submitted_range: Range<u64>, tx_latency_submitted_buckets: u64, tx_latency_confirmed_range: Range<u64>, tx_latency_confirmed_buckets: u64, namespace: &str, ) -> Self
Sourcepub fn gather(&self) -> Vec<MetricFamily>
pub fn gather(&self) -> Vec<MetricFamily>
Gather the metrics for export
pub fn init_worker_by_type(&self, worker_type: WorkerType)
pub fn init_per_chain(&self, chain_id: &ChainId)
pub fn init_per_channel( &self, src_chain: &ChainId, dst_chain: &ChainId, src_channel: &ChannelId, dst_channel: &ChannelId, src_port: &PortId, dst_port: &PortId, )
pub fn init_per_path( &self, chain: &ChainId, counterparty: &ChainId, channel: &ChannelId, port: &PortId, clear_packets: bool, )
pub fn init_per_client( &self, src_chain: &ChainId, dst_chain: &ChainId, client: &ClientId, misbehaviour: bool, )
Sourcepub fn worker(&self, worker_type: WorkerType, count: i64)
pub fn worker(&self, worker_type: WorkerType, count: i64)
Update the number of workers per object
Sourcepub fn client_updates_submitted(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
client: &ClientId,
count: u64,
)
pub fn client_updates_submitted( &self, src_chain: &ChainId, dst_chain: &ChainId, client: &ClientId, count: u64, )
Update the number of client updates per client
Sourcepub fn client_updates_skipped(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
client: &ClientId,
count: u64,
)
pub fn client_updates_skipped( &self, src_chain: &ChainId, dst_chain: &ChainId, client: &ClientId, count: u64, )
Update the number of client updates skipped per client
Sourcepub fn client_misbehaviours_submitted(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
client: &ClientId,
count: u64,
)
pub fn client_misbehaviours_submitted( &self, src_chain: &ChainId, dst_chain: &ChainId, client: &ClientId, count: u64, )
Number of client misbehaviours per client
Sourcepub fn receive_packets_confirmed(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
src_channel: &ChannelId,
dst_channel: &ChannelId,
src_port: &PortId,
dst_port: &PortId,
count: u64,
)
pub fn receive_packets_confirmed( &self, src_chain: &ChainId, dst_chain: &ChainId, src_channel: &ChannelId, dst_channel: &ChannelId, src_port: &PortId, dst_port: &PortId, count: u64, )
Number of receive packets relayed, per channel
Sourcepub fn acknowledgment_packets_confirmed(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
src_channel: &ChannelId,
dst_channel: &ChannelId,
src_port: &PortId,
dst_port: &PortId,
count: u64,
)
pub fn acknowledgment_packets_confirmed( &self, src_chain: &ChainId, dst_chain: &ChainId, src_channel: &ChannelId, dst_channel: &ChannelId, src_port: &PortId, dst_port: &PortId, count: u64, )
Number of acknowledgment packets relayed, per channel
Sourcepub fn timeout_packets_confirmed(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
src_channel: &ChannelId,
dst_channel: &ChannelId,
src_port: &PortId,
dst_port: &PortId,
count: u64,
)
pub fn timeout_packets_confirmed( &self, src_chain: &ChainId, dst_chain: &ChainId, src_channel: &ChannelId, dst_channel: &ChannelId, src_port: &PortId, dst_port: &PortId, count: u64, )
Number of timeout packets relayed, per channel
Sourcepub fn query(&self, chain_id: &ChainId, query_type: &'static str)
pub fn query(&self, chain_id: &ChainId, query_type: &'static str)
Number of queries emitted by the relayer, per chain and query type
Sourcepub fn queries_cache_hits(&self, chain_id: &ChainId, query_type: &'static str)
pub fn queries_cache_hits(&self, chain_id: &ChainId, query_type: &'static str)
Number of cache hits for queries emitted by the relayer, per chain and query type
Sourcepub fn ws_reconnect(&self, chain_id: &ChainId)
pub fn ws_reconnect(&self, chain_id: &ChainId)
Number of time the relayer had to reconnect to the WebSocket endpoint, per chain
Sourcepub fn ws_events(&self, chain_id: &ChainId, count: u64)
pub fn ws_events(&self, chain_id: &ChainId, count: u64)
How many IBC events did Hermes receive via the WebSocket subscription, per chain
Sourcepub fn messages_submitted(&self, chain_id: &ChainId, count: u64)
pub fn messages_submitted(&self, chain_id: &ChainId, count: u64)
How many messages Hermes submitted to the chain
Sourcepub fn wallet_balance(
&self,
chain_id: &ChainId,
account: &str,
amount: f64,
denom: &str,
)
pub fn wallet_balance( &self, chain_id: &ChainId, account: &str, amount: f64, denom: &str, )
The balance in each wallet that Hermes is using, per account, denom and chain.
The amount given is of unit: 10^6 * denom
pub fn received_event_batch(&self, tracking_id: impl ToString)
pub fn tx_submitted( &self, tx_count: usize, tracking_id: impl ToString, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
pub fn tx_confirmed( &self, tx_count: usize, tracking_id: impl ToString, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
pub fn send_packet_events( &self, _seq_nr: u64, _height: u64, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
pub fn acknowledgement_events( &self, _seq_nr: u64, _height: u64, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
pub fn timeout_events( &self, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
pub fn cleared_send_packet_events( &self, _seq_nr: u64, _height: u64, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
pub fn cleared_acknowledgment_events( &self, _seq_nr: u64, _height: u64, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
Sourcepub fn backlog_insert(
&self,
seq_nr: u64,
chain_id: &ChainId,
channel_id: &ChannelId,
port_id: &PortId,
counterparty_chain_id: &ChainId,
)
pub fn backlog_insert( &self, seq_nr: u64, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
Inserts in the backlog a new event for the given sequence number. This happens when the relayer observed a new SendPacket event.
Sourcepub fn update_backlog(
&self,
sequences: Vec<u64>,
chain_id: &ChainId,
channel_id: &ChannelId,
port_id: &PortId,
counterparty_chain_id: &ChainId,
)
pub fn update_backlog( &self, sequences: Vec<u64>, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
Inserts in the backlog a new event for the given sequence number. This happens when the relayer observed a new SendPacket event.
Sourcepub fn backlog_remove(
&self,
seq_nr: u64,
chain_id: &ChainId,
channel_id: &ChannelId,
port_id: &PortId,
counterparty_chain_id: &ChainId,
)
pub fn backlog_remove( &self, seq_nr: u64, chain_id: &ChainId, channel_id: &ChannelId, port_id: &PortId, counterparty_chain_id: &ChainId, )
Evicts from the backlog the event for the given sequence number. Removing events happens when the relayer observed either an acknowledgment or a timeout for a packet sequence number, which means that the corresponding packet was relayed.
Sourcepub fn fees_amount(
&self,
chain_id: &ChainId,
receiver: &Signer,
fee_amounts: Coin<String>,
)
pub fn fees_amount( &self, chain_id: &ChainId, receiver: &Signer, fee_amounts: Coin<String>, )
Record the rewarded fee from ICS29 if the address is in the registered addresses list.
pub fn update_period_fees( &self, chain_id: &ChainId, receiver: &String, denom: &String, )
pub fn add_visible_fee_address(&self, address: String)
Sourcepub fn broadcast_errors(
&self,
address: &String,
error_code: u32,
error_description: &str,
)
pub fn broadcast_errors( &self, address: &String, error_code: u32, error_description: &str, )
Add an error and its description to the list of errors observed after broadcasting a Tx with a specific account.
Sourcepub fn simulate_errors(
&self,
address: &String,
recoverable: bool,
error_description: String,
)
pub fn simulate_errors( &self, address: &String, recoverable: bool, error_description: String, )
Add an error and its description to the list of errors observed after simulating a Tx with a specific account.
pub fn dynamic_gas_queried_fees(&self, chain_id: &ChainId, amount: f64)
pub fn dynamic_gas_paid_fees(&self, chain_id: &ChainId, amount: f64)
pub fn dynamic_gas_queried_success_fees(&self, chain_id: &ChainId, amount: f64)
Sourcepub fn filtered_packets(
&self,
src_chain: &ChainId,
dst_chain: &ChainId,
src_channel: &ChannelId,
dst_channel: &ChannelId,
src_port: &PortId,
dst_port: &PortId,
count: u64,
)
pub fn filtered_packets( &self, src_chain: &ChainId, dst_chain: &ChainId, src_channel: &ChannelId, dst_channel: &ChannelId, src_port: &PortId, dst_port: &PortId, count: u64, )
Increment number of packets filtered because the memo field is too big
pub fn cross_chain_queries( &self, src_chain: &ChainId, dst_chain: &ChainId, count: usize, )
pub fn cross_chain_query_responses( &self, src_chain: &ChainId, dst_chain: &ChainId, ccq_responses_codes: Vec<Code>, )
Auto Trait Implementations§
impl !Freeze for TelemetryState
impl !RefUnwindSafe for TelemetryState
impl !UnwindSafe for TelemetryState
impl Send for TelemetryState
impl Sync for TelemetryState
impl Unpin for TelemetryState
impl UnsafeUnpin for TelemetryState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request