Skip to content
This repository has been archived by the owner on May 15, 2020. It is now read-only.

Commit

Permalink
Merge pull request #50 from ashangit/master
Browse files Browse the repository at this point in the history
 maxAgeSeconds has badly been increase which leads to false positive latency issue
  • Loading branch information
Nicolas Fraison authored May 12, 2020
2 parents 647f93b + 0b3c837 commit 9a86855
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,6 @@ public class CouchbaseMetrics implements AutoCloseable {
.labelNames("cluster", "bucket", "instance")
.register();

private static final Summary LATENCY = Summary.build()
.name("couchbase_latency")
.help("Disk persistence latency for a set operation")
.labelNames("cluster", "bucket", "instance", "command")
.maxAgeSeconds(5 * 60)
.ageBuckets(5)
.quantile(0.5, 0.05)
.quantile(0.9, 0.01)
.quantile(0.99, 0.001)
.register();

private static final Gauge OPERATIONS = Gauge.build()
.name("couchbase_operations")
.help("Ongoing rebalance operatio on the cluster")
Expand Down Expand Up @@ -78,13 +67,6 @@ public void updateMembership(final Map<InetSocketAddress, String> memberships) {
.set(memberships.values().stream().filter(v -> !v.startsWith("active")).count());
}

public void updateDiskLatency(final Map<InetSocketAddress, Long> latencies) {
latencies.forEach((statname, latency) -> {
LATENCY.labels(clusterName, bucketName, statname.getHostName(), "persistToDisk")
.observe(latency);
});
}

public void updatecollectApiStatsBucket(final Map<InetSocketAddress, Map<String, Double>> nodesStats) {
nodesStats.forEach((addr, stats) -> {
stats.forEach((statname, statvalue) -> {
Expand All @@ -107,7 +89,6 @@ public void updatecollectApiStatsBucketXdcr(final Map<String, Map<String, Double
public void close() {
// FIXME we should remove only metrics with the labels cluster=clustername, bucket=bucketName
UP.clear();
LATENCY.clear();
OPERATIONS.clear();
MEMBERSHIP.clear();
STATS.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MemcachedMetrics implements AutoCloseable {
.name("memcached_latency")
.help("Get and Set latencies")
.labelNames("cluster", "bucket", "instance", "command")
.maxAgeSeconds(5 * 60)
.maxAgeSeconds(60)
.ageBuckets(5)
.quantile(0.5, 0.05)
.quantile(0.9, 0.01)
Expand Down

0 comments on commit 9a86855

Please sign in to comment.