Skip to content

Commit

Permalink
Add 99.99th produce delay and records delay (#141)
Browse files Browse the repository at this point in the history
* Add 99.99th produce delay and records delay
  • Loading branch information
xiowu0 authored Nov 30, 2018
1 parent 36c5f2b commit 4ce1c51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/java/com/linkedin/kmf/services/ConsumeService.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ public ConsumeMetrics(final Metrics metrics, final Map<String, String> tags) {
int sizeInBytes = 4 * bucketNum;
_recordsDelay.add(new Percentiles(sizeInBytes, _latencyPercentileMaxMs, Percentiles.BucketSizing.CONSTANT,
new Percentile(new MetricName("records-delay-ms-99th", METRIC_GROUP_NAME, "The 99th percentile latency of records from producer to consumer", tags), 99.0),
new Percentile(new MetricName("records-delay-ms-999th", METRIC_GROUP_NAME, "The 999th percentile latency of records from producer to consumer", tags), 99.9)));
new Percentile(new MetricName("records-delay-ms-999th", METRIC_GROUP_NAME, "The 99.9th percentile latency of records from producer to consumer", tags), 99.9),
new Percentile(new MetricName("records-delay-ms-9999th", METRIC_GROUP_NAME, "The 99.99th percentile latency of records from producer to consumer", tags), 99.99)));

metrics.addMetric(new MetricName("consume-availability-avg", METRIC_GROUP_NAME, "The average consume availability", tags),
new Measurable() {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/linkedin/kmf/services/ProduceService.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,8 @@ public ProduceMetrics(final Metrics metrics, final Map<String, String> tags) {
int sizeInBytes = 4 * bucketNum;
_produceDelay.add(new Percentiles(sizeInBytes, _latencyPercentileMaxMs, Percentiles.BucketSizing.CONSTANT,
new Percentile(new MetricName("produce-delay-ms-99th", METRIC_GROUP_NAME, "The 99th percentile delay in ms for produce request", tags), 99.0),
new Percentile(new MetricName("produce-delay-ms-999th", METRIC_GROUP_NAME, "The 999th percentile delay in ms for produce request", tags), 99.9)));
new Percentile(new MetricName("produce-delay-ms-999th", METRIC_GROUP_NAME, "The 99.9th percentile delay in ms for produce request", tags), 99.9),
new Percentile(new MetricName("produce-delay-ms-9999th", METRIC_GROUP_NAME, "The 99.99th percentile delay in ms for produce request", tags), 99.99)));

metrics.addMetric(new MetricName("produce-availability-avg", METRIC_GROUP_NAME, "The average produce availability", tags),
new Measurable() {
Expand Down
5 changes: 5 additions & 0 deletions webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,16 @@ <h1 style="text-align:center">Kafka Monitor GUI</h1>
var monitoredMbeans = [
{name: "kmf.services:type=produce-service,name=*", attribute: "produce-availability-avg"},
{name: "kmf.services:type=produce-service,name=*", attribute: "records-produced-rate"},
{name: "kmf.services:type=produce-service,name=*", attribute: "produce-delay-ms-avg"},
{name: "kmf.services:type=produce-service,name=*", attribute: "produce-delay-ms-99th"},
{name: "kmf.services:type=produce-service,name=*", attribute: "produce-delay-ms-999th"},
{name: "kmf.services:type=produce-service,name=*", attribute: "produce-delay-ms-9999th"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-lost-rate"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-duplicated-rate"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-delay-ms-avg"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-delay-ms-99th"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-delay-ms-999th"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-delay-ms-9999th"},
{name: "kmf.services:type=consume-service,name=*", attribute: "records-delay-ms-max"},
];

Expand Down

0 comments on commit 4ce1c51

Please sign in to comment.