Skip to content

Commit

Permalink
add logging and change the metric name (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil Acharya authored Jul 5, 2023
1 parent ba81058 commit bb0a5a0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nft_ingester/src/program_transformers/token/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{error::IngesterError, tasks::TaskData};
use blockbuster::programs::token_account::TokenProgramAccount;
use cadence_macros::statsd_count;
use digital_asset_types::dao::{asset, asset_data, token_accounts, tokens};
use log::error;
use log::warn;
use plerkle_serialization::AccountInfo;
use sea_orm::{
entity::*, query::*, sea_query::OnConflict, ActiveValue::Set, ConnectionTrait,
Expand Down Expand Up @@ -87,9 +87,11 @@ pub async fn handle_token_program_account<'a, 'b, 'c>(

if let Some(data) = data {
if data.metadata_url.is_empty() {
statsd_count!("token_account.empty_url", 1);
statsd_count!("ingester.token_account.empty_url", 1);
warn!("url is absent")
} else {
statsd_count!("token_account.non_empty_url", 1);
statsd_count!("ingester.token_account.non_empty_url", 1);
warn!("url is present")
}
}
}
Expand Down

0 comments on commit bb0a5a0

Please sign in to comment.