code_to_str

Function code_to_str 

Source
pub fn code_to_str(code: Code) -> String
Expand description

Converts a gRPC Code to a human-readable string for labeling metrics.

§Arguments

  • code - The gRPC status code to convert.

§Returns

A string representation of the gRPC code suitable for use as a metric label.