private boolean isOverThreshold ( final ThresholdLogSpan span ) { String service = ( String ) span . tag ( Tags . PEER_SERVICE . getKey ( ) ) ; if ( SERVICE_KV . equals ( service ) ) { return span . durationMicros ( ) >= kvThreshold ; } else if ( SERVICE_N1QL . equals ( service ) ) { return span . durationMicros ( ) >= n1qlThreshold ; } else if ( SERVICE_VIEW . equals ( service ) ) { return span . durationMicros ( ) >= viewThreshold ; } else if ( SERVICE_FTS . equals ( service ) ) { return span . durationMicros ( ) >= ftsThreshold ; } else if ( SERVICE_ANALYTICS . equals ( service ) ) { return span . durationMicros ( ) >= analyticsThreshold ; } else { return false ; } }
Checks if the given span is over the threshold and eligible for being reported .