@@ -34,7 +34,7 @@ public class TokenTransferMonitoringService : ITokenTransferMonitoringService, I
3434 private readonly TokenTransferMonitoringOptions _options ;
3535 private readonly IOptionsMonitor < GlobalOptions > _globalOptions ;
3636 private readonly ITokenPriceService _tokenPriceService ;
37- private readonly Histogram < double > _transferEventsHistogram ;
37+ private readonly Histogram < double > _transferUSDEventsHistogram ;
3838 private readonly Counter < long > _transferCountsCounter ;
3939 private readonly HashSet < string > _blacklistAddresses ;
4040 private readonly HashSet < string > _toOnlyMonitoredAddresses ;
@@ -64,7 +64,7 @@ public TokenTransferMonitoringService(
6464 _toOnlyMonitoredAddresses = new HashSet < string > ( _options . ToOnlyMonitoredAddresses , StringComparer . OrdinalIgnoreCase ) ;
6565 _largeAmountOnlyAddresses = new HashSet < string > ( _options . LargeAmountOnlyAddresses , StringComparer . OrdinalIgnoreCase ) ;
6666 // Initialize histogram with configured buckets
67- _transferEventsHistogram = instrumentationProvider . Meter . CreateHistogram < double > (
67+ _transferUSDEventsHistogram = instrumentationProvider . Meter . CreateHistogram < double > (
6868 "aelf_transfer_usd_value" ,
6969 "ms" ,
7070 "Token transfer events with amount distribution" ) ;
@@ -337,8 +337,8 @@ public void SendTransferMetrics(TransferEventDto transfer)
337337 // Only record histogram for high-value transfers
338338 if ( isHighValue )
339339 {
340- _transferEventsHistogram . Record ( ( double ) transfer . Amount , outboundTags ) ;
341- _transferEventsHistogram . Record ( ( double ) transfer . Amount , inboundTags ) ;
340+ _transferUSDEventsHistogram . Record ( ( double ) transfer . UsdValue , outboundTags ) ;
341+ _transferUSDEventsHistogram . Record ( ( double ) transfer . UsdValue , inboundTags ) ;
342342 _logger . LogInformation ( "Sent transfer metrics for transaction {TransactionId}, amount {Amount} {Symbol}, USD value {UsdValue}" ,
343343 transfer . TransactionId , transfer . Amount , transfer . Symbol , transfer . UsdValue ) ;
344344 }
0 commit comments