From 6a136f052be6ade016972b2e160a344ee7a1105c Mon Sep 17 00:00:00 2001 From: kevodwyer Date: Fri, 27 Oct 2023 17:16:09 +0100 Subject: [PATCH 1/2] update s3 prometheus metric names --- .../peergos/blockstore/s3/S3Blockstore.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java b/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java index a8ff95e0..28d08b7d 100644 --- a/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java +++ b/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java @@ -36,46 +36,46 @@ public class S3Blockstore implements Blockstore { private static final Histogram readTimerLog = Histogram.build() .labelNames("filesize") - .name("block_read_seconds") + .name("nabu_block_read_seconds") .help("Time to read a block from immutable storage") .exponentialBuckets(0.01, 2, 16) .register(); private static final Histogram writeTimerLog = Histogram.build() .labelNames("filesize") - .name("s3_block_write_seconds") + .name("nabu_s3_block_write_seconds") .help("Time to write a block to immutable storage") .exponentialBuckets(0.01, 2, 16) .register(); private static final Counter blockHeads = Counter.build() - .name("s3_block_heads") + .name("nabu_s3_block_heads") .help("Number of block heads to S3") .register(); private static final Counter blockGets = Counter.build() - .name("s3_block_gets") + .name("nabu_s3_block_gets") .help("Number of block gets to S3") .register(); private static final Counter failedBlockGets = Counter.build() - .name("s3_block_get_failures") + .name("nabu_s3_block_get_failures") .help("Number of failed block gets to S3") .register(); private static final Counter blockPuts = Counter.build() - .name("s3_block_puts") + .name("nabu_s3_block_puts") .help("Number of block puts to S3") .register(); private static final Histogram blockPutBytes = Histogram.build() .labelNames("size") - .name("s3_block_put_bytes") + .name("nabu_s3_block_put_bytes") .help("Number of bytes written to S3") .exponentialBuckets(0.01, 2, 16) .register(); private static final Counter getRateLimited = Counter.build() - .name("s3_get_rate_limited") + .name("nabu_s3_get_rate_limited") .help("Number of times we get a http 429 rate limit response during a block get") .register(); private static final Counter rateLimited = Counter.build() - .name("s3_rate_limited") + .name("nabu_s3_rate_limited") .help("Number of times we get a http 429 rate limit response") .register(); From 01151ecd3fd35846a01c977f941b61b3d6f9e99c Mon Sep 17 00:00:00 2001 From: kevodwyer Date: Mon, 30 Oct 2023 07:10:40 +0000 Subject: [PATCH 2/2] rename metrics to align with existing ipfs nucleus metrics --- .../peergos/blockstore/s3/S3Blockstore.java | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java b/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java index 28d08b7d..333467c0 100644 --- a/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java +++ b/src/main/java/org/peergos/blockstore/s3/S3Blockstore.java @@ -35,47 +35,44 @@ public class S3Blockstore implements Blockstore { private static final Logger LOG = Logging.LOG(); private static final Histogram readTimerLog = Histogram.build() - .labelNames("filesize") - .name("nabu_block_read_seconds") + .name("ipfs_block_read_seconds") .help("Time to read a block from immutable storage") .exponentialBuckets(0.01, 2, 16) .register(); private static final Histogram writeTimerLog = Histogram.build() - .labelNames("filesize") - .name("nabu_s3_block_write_seconds") + .name("ipfs_block_write_seconds") .help("Time to write a block to immutable storage") .exponentialBuckets(0.01, 2, 16) .register(); private static final Counter blockHeads = Counter.build() - .name("nabu_s3_block_heads") - .help("Number of block heads to S3") + .name("ipfs_block_heads_total") + .help("The total number of S3 block head requests") .register(); private static final Counter blockGets = Counter.build() - .name("nabu_s3_block_gets") - .help("Number of block gets to S3") + .name("ipfs_block_gets_total") + .help("The total number of S3 block get requests") .register(); private static final Counter failedBlockGets = Counter.build() - .name("nabu_s3_block_get_failures") + .name("ipfs_block_get_failures") .help("Number of failed block gets to S3") .register(); private static final Counter blockPuts = Counter.build() - .name("nabu_s3_block_puts") + .name("ipfs_block_puts_total") .help("Number of block puts to S3") .register(); private static final Histogram blockPutBytes = Histogram.build() - .labelNames("size") - .name("nabu_s3_block_put_bytes") + .name("ipfs_block_put_bytes") .help("Number of bytes written to S3") .exponentialBuckets(0.01, 2, 16) .register(); private static final Counter getRateLimited = Counter.build() - .name("nabu_s3_get_rate_limited") + .name("ipfs_get_rate_limited_total") .help("Number of times we get a http 429 rate limit response during a block get") .register(); private static final Counter rateLimited = Counter.build() - .name("nabu_s3_rate_limited") + .name("ipfs_rate_limited_total") .help("Number of times we get a http 429 rate limit response") .register();