Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/sui-indexer-alt-jsonrpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,23 +561,23 @@ mod tests {
assert_eq!(
metrics
.requests_received
.with_label_values(&["UNKNOWN:test_baz"])
.with_label_values(&["<UNKNOWN>"])
.get(),
1
);

assert_eq!(
metrics
.requests_succeeded
.with_label_values(&["UNKNOWN:test_baz"])
.with_label_values(&["<UNKNOWN>"])
.get(),
0
);

assert_eq!(
metrics
.requests_failed
.with_label_values(&["UNKNOWN:test_baz", &format!("{METHOD_NOT_FOUND_CODE}")])
.with_label_values(&["<UNKNOWN>", &format!("{METHOD_NOT_FOUND_CODE}")])
.get(),
1
);
Expand Down
6 changes: 1 addition & 5 deletions crates/sui-indexer-alt-jsonrpc/src/metrics/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,7 @@ where
let method = if self.layer.methods.contains(request.method_name()) {
request.method.clone()
} else {
// TODO(DVX-1210): the request method name is only here to make sure we know
// about all the methods called by first party apps. We should change
// this back to "<UNKNOWN>" once we have stabilized the API to avoid
// high cardinality of metrics labels.
format!("UNKNOWN:{}", request.method_name()).into()
"<UNKNOWN>".into()
};

self.layer
Expand Down
Loading