Module metrics

Source
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§

API_RPC_FAILURES
AVAILABLE_MEMORY
CLOSE_WAIT_SOCKETS
CPU_USAGE
DISK_USAGE
DISK_USAGE_PERCENT
ERROR_COUNTER
FILE_DESCRIPTORS
IN_FLIGHT_REQUESTS
MEMORY_USAGE
MEMORY_USAGE_PERCENT
PLUGIN_CALLS
RAW_REQUEST_COUNTER
REGISTRY
REQUEST_COUNTER
REQUEST_LATENCY
RPC_CALL_LATENCY
TIMEOUT_COUNTER
TOTAL_MEMORY
TRANSACTIONS_BY_STATUS
TRANSACTIONS_CREATED
TRANSACTIONS_FAILED
TRANSACTIONS_SUBMITTED
TRANSACTIONS_SUCCESS
TRANSACTION_PROCESSING_TIME

Functions§

gather_metrics
Gather all metrics and encode into the provided format.
update_system_metrics
Updates the system metrics for CPU and memory usage.