Skip to content

Commit

Permalink
fix(hubble): pagination and logging with spans
Browse files Browse the repository at this point in the history
feat(hubble): add logging for debug

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans - remove canonical

feat(hubble): logging with spans - propagate span in tasks

feat(hubble): logging with spans - set chain_id in eth

feat(hubble): logging with spans - remove logging full block

feat(hubble): logging with spans - disable 'fork indexing'

feat(hubble): logging with spans - postpone begin tx

feat(hubble): logging with spans - limit scope of insert to single
record

feat(hubble): logging with spans - fix pagination

feat(hubble): logging with spans - remove unused code

fix(hubble): pagination and logging with spans

feat(hubble): add logging for debug

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans - remove canonical

feat(hubble): logging with spans - propagate span in tasks

feat(hubble): logging with spans - set chain_id in eth

feat(hubble): logging with spans - remove logging full block

feat(hubble): logging with spans - disable 'fork indexing'

feat(hubble): logging with spans - postpone begin tx

feat(hubble): logging with spans - limit scope of insert to single
record

feat(hubble): logging with spans - fix pagination

feat(hubble): logging with spans - remove unused code

fix(hubble): pagination and logging with spans

feat(hubble): add logging for debug

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans - remove canonical

feat(hubble): logging with spans - propagate span in tasks

feat(hubble): logging with spans - set chain_id in eth

feat(hubble): logging with spans - remove logging full block

feat(hubble): logging with spans - disable 'fork indexing'

feat(hubble): logging with spans - postpone begin tx

feat(hubble): logging with spans - limit scope of insert to single
record

feat(hubble): logging with spans - fix pagination

feat(hubble): logging with spans - remove unused code

fix(hubble): pagination and logging with spans

feat(hubble): add logging for debug

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans

feat(hubble): logging with spans - remove canonical

feat(hubble): logging with spans - propagate span in tasks

feat(hubble): logging with spans - set chain_id in eth

feat(hubble): logging with spans - remove logging full block

feat(hubble): logging with spans - disable 'fork indexing'

feat(hubble): logging with spans - postpone begin tx

feat(hubble): logging with spans - limit scope of insert to single
record

feat(hubble): logging with spans - fix pagination

feat(hubble): logging with spans - remove unused code
  • Loading branch information
qlp committed Jun 4, 2024
1 parent 4c12684 commit bcacc0e
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 245 deletions.
20 changes: 18 additions & 2 deletions hubble/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::{net::SocketAddr, str::FromStr};

use clap::Parser;
use tracing::{info_span, Instrument};
use url::Url;

use crate::logging::LogFormat;
Expand Down Expand Up @@ -70,9 +71,24 @@ pub enum IndexerConfig {

impl IndexerConfig {
pub async fn index(self, db: sqlx::PgPool) -> Result<(), color_eyre::eyre::Report> {
let rpc_type = match self {
Self::Tm(_) => "tendermint",
Self::Eth(_) => "ethereum",
};

let initializer_span = info_span!("initializer", rpc_type);
let indexer_span = info_span!("indexer", rpc_type);

match self {
Self::Tm(cfg) => cfg.index(db).await,
Self::Eth(cfg) => cfg.indexer(db).await?.index().await,
Self::Tm(cfg) => cfg.index(db).instrument(indexer_span).await,
Self::Eth(cfg) => {
cfg.indexer(db)
.instrument(initializer_span)
.await?
.index()
.instrument(indexer_span)
.await
}
}
}
}
Expand Down
Loading

0 comments on commit bcacc0e

Please sign in to comment.