Expand description
Metrics module for the application.
- This module contains the global Prometheus registry.
- Defines specific metrics for the application.
Modules§
- middleware
- This defines the Middleware to collect metrics for the application. This middleware will increment the request counter for each request for each endpoint.
Structs§
- AVAILABLE_
MEMORY - CPU_
USAGE - DISK_
USAGE - DISK_
USAGE_ PERCENT - ERROR_
COUNTER - MEMORY_
USAGE - MEMORY_
USAGE_ PERCENT - RAW_
REQUEST_ COUNTER - REGISTRY
- REQUEST_
COUNTER - REQUEST_
LATENCY - TOTAL_
MEMORY
Functions§
- gather_
metrics - Gather all metrics and encode into the provided format.
- update_
system_ metrics - Updates the system metrics for CPU and memory usage.