From bb0a5a02ea8449d861ce61b44303641c57b9c275 Mon Sep 17 00:00:00 2001 From: Nikhil Acharya <128666399+nikhil-helius@users.noreply.github.com> Date: Wed, 5 Jul 2023 11:39:13 +0530 Subject: [PATCH] add logging and change the metric name (#77) --- nft_ingester/src/program_transformers/token/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nft_ingester/src/program_transformers/token/mod.rs b/nft_ingester/src/program_transformers/token/mod.rs index 9fd11abe4..b965da7f4 100644 --- a/nft_ingester/src/program_transformers/token/mod.rs +++ b/nft_ingester/src/program_transformers/token/mod.rs @@ -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, @@ -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") } } }