Skip to content
This repository has been archived by the owner on Dec 3, 2019. It is now read-only.

Commit

Permalink
Add consumer failed metric
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Yang committed May 18, 2017
1 parent 2a0a9ad commit 7e98a04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ public void run() {
}
} catch (Throwable throwable) {
logger.error("InputHostConnection caught unexpected exception", throwable);
metricsReporter.report(Counter.PUBLISHER_MESSAGES_OUT_FAILED, 1L);
stoppedLatch.countDown();
close();
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ public void run() {
}
} catch (Throwable throwable) {
logger.error("ReadMessagesPump caught unexpected exception, remote={}", acknowledgerID, throwable);
metricsReporter.report(Counter.CONSUMER_MESSAGES_IN_FAILED, 1L);
closeAndNotify();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ public enum Counter {
PUBLISHER_RECONFIGS("cherami.publish.reconfigure.rate"),
/** Number of messages received by the consumer. */
CONSUMER_MESSAGES_IN("cherami.consume.message.rate"),
/** Number of consume message attempts that failed or timed out */
CONSUMER_MESSAGES_IN_FAILED("cherami.consumer.message.failed"),
/** Number of credits sent from the consumer to outputhosts. */
CONSUMER_CREDITS_OUT("cherami.consume.credit.rate"),
/** Number of credits that failed on send or timed out. */
Expand Down

0 comments on commit 7e98a04

Please sign in to comment.