Skip to content

Commit 032ee30

Browse files
committed
fix: reduce cardinality of metrics
1 parent 979e520 commit 032ee30

File tree

3 files changed

+6
-6
lines changed
  • packages
    • common/pools/src
    • core/services/cluster/src/workflows/server/install/install_scripts/components

3 files changed

+6
-6
lines changed

packages/common/pools/src/db/sqlite/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ impl SqlitePoolManager {
515515
// by calculating the size ratio
516516
let ratio = data.len() as f64 / total_data_size;
517517
metrics::SQLITE_UPLOAD_DB_RATE
518-
.with_label_values(&[&hex_key])
518+
.with_label_values(&[])
519519
.set(data.len() as f64 / (dt * ratio));
520520
}
521521

@@ -707,7 +707,7 @@ impl SqlitePoolManager {
707707

708708
let dt = start_instant.elapsed();
709709
metrics::SQLITE_DOWNLOAD_DB_RATE
710-
.with_label_values(&[&hex_key])
710+
.with_label_values(&[])
711711
.set(data_len as f64 / dt.as_secs_f64());
712712

713713
Ok(true)

packages/common/pools/src/metrics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ lazy_static::lazy_static! {
7474
pub static ref SQLITE_UPLOAD_DB_RATE: GaugeVec = register_gauge_vec_with_registry!(
7575
"sqlite_upload_db_rate",
7676
"Rate to read and upload to FDB an sqlite DB in bytes/s.",
77-
&["key"],
77+
&[],
7878
*REGISTRY,
7979
)
8080
.unwrap();
8181
pub static ref SQLITE_DOWNLOAD_DB_RATE: GaugeVec = register_gauge_vec_with_registry!(
8282
"sqlite_download_db_rate",
8383
"Rate to download and write to file an sqlite DB from FDB in bytes/s.",
84-
&["key"],
84+
&[],
8585
*REGISTRY,
8686
)
8787
.unwrap();

packages/core/services/cluster/src/workflows/server/install/install_scripts/components/vector.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ pub fn configure(namespace: &str, config: &Config, pool_type: PoolType) -> Globa
7171
},
7272
"compression": true,
7373

74-
//Buffer to disk for durability & reduce memory usage
74+
// Buffer to disk for durability & reduce memory usage
7575
"buffer": {
7676
"type": "disk",
77-
"max_size": 268435488, // 256 MB
77+
"max_size": 2 * 1024 * 1024 * 1024, // 2 GiB
7878
"when_full": "block"
7979
}
8080
}

0 commit comments

Comments
 (0)