Skip to content

Commit

Permalink
fix: disable path label in opendal for now (#5247)
Browse files Browse the repository at this point in the history
* fix: remove path label in opendal for now

* fix: typo

Co-authored-by: Ruihang Xia <[email protected]>

---------

Co-authored-by: Ruihang Xia <[email protected]>
  • Loading branch information
shuiyisong and waynexia authored Dec 27, 2024
1 parent dad8ac6 commit 588f675
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/object-store/src/layers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,18 @@ mod prometheus {
/// pattern `<data|index>/catalog/schema/table_id/...` OR `greptimedb/object_cache/<read|write>/...`
///
/// We'll get the data/catalog/schema from path.
pub fn build_prometheus_metrics_layer(with_path_label: bool) -> PrometheusLayer {
pub fn build_prometheus_metrics_layer(_with_path_label: bool) -> PrometheusLayer {
PROMETHEUS_LAYER
.get_or_init(|| {
let path_level = if with_path_label { 3 } else { 0 };
// let path_level = if with_path_label { 3 } else { 0 };

// opendal doesn't support dynamic path label trim
// we have uuid in index path, which causes the label size to explode
// remove path label first, waiting for later fix
// TODO(shuiyisong): add dynamic path label trim for opendal

let layer = PrometheusLayer::builder()
.path_label(path_level)
.path_label(0)
.register_default()
.unwrap();

Expand Down

0 comments on commit 588f675

Please sign in to comment.