Metrics
The cortex get
and cortex get API_NAME
commands display the request time (averaged over the past 2 weeks) and response code counts (summed over the past 2 weeks) for your APIs:
The cortex get API_NAME
command also provides a link to a Grafana dashboard:
Metrics in the dashboard
Custom user metrics
It is possible to export custom user metrics by adding the metrics_client
argument to the predictor constructor. Below there is an example of how to use the metrics client with the PythonPredictor
type. The implementation would be similar to other predictor types.
Note: The metrics client uses the UDP protocol to push metrics, to be fault tolerant, so if it fails during a metrics push there is no exception thrown.
Last updated