Function iota_metrics::metrics

source ยท
pub async fn metrics(__arg0: Extension<RegistryService>) -> (StatusCode, String)
Expand description

Handles a request to retrieve metrics, using the provided RegistryService to gather all registered metric families. The metrics are then encoded to a text format for easy consumption by monitoring systems. If successful, it returns the metrics string with an OK status. If an error occurs during encoding, it returns an INTERNAL_SERVER_ERROR status along with an error message. Returns a tuple containing the status code and either the metrics data or an error description.