Skip to content

Commit b71bb27

Browse files
committed
refactor: trim metrics docs
1 parent a736a78 commit b71bb27

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

apps/ibc-attestor/src/metrics.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@ pub const CONTENT_TYPE: &str = "text/plain; version=0.0.4";
242242
/// Record `attestor_rpc_requests_total` and `attestor_rpc_request_duration_seconds`
243243
/// for the awaited gRPC handler future.
244244
///
245-
/// The status code is read directly from the handler's `Result`, so no
246-
/// header/trailer inspection is needed.
247-
///
248245
/// # Errors
249246
/// Forwards the inner future's `Err(tonic::Status)` unchanged.
250247
pub async fn track_rpc<F, T>(method: &str, fut: F) -> Result<T, tonic::Status>
@@ -262,15 +259,13 @@ where
262259
result
263260
}
264261

265-
/// Convert a [`tonic::Code`] into a stable, low-cardinality label value
266-
/// (`snake_case` derived from the enum variant name).
262+
/// Convert a [`tonic::Code`] into a label value.
267263
#[must_use]
268264
pub fn code_label(code: tonic::Code) -> String {
269265
pascal_to_snake(&format!("{code:?}"))
270266
}
271267

272-
/// Convert a `PascalCase` identifier to `snake_case`.
273-
pub(crate) fn pascal_to_snake(s: &str) -> String {
268+
fn pascal_to_snake(s: &str) -> String {
274269
let mut out = String::with_capacity(s.len() + 4);
275270
for (i, b) in s.bytes().enumerate() {
276271
if b.is_ascii_uppercase() && i != 0 {

0 commit comments

Comments
 (0)