Skip to content

Operate

The goal is to ensure that the serving is reliable, stable, and manageable. This is achieved by monitoring the service against target KPIs.

In practice, the pipeline service logs:

  • HTTP middleware (api.py): logs request_completed only for requests with status code >=400 or duration above SLOW_REQUEST_MS (default 50 ms).
  • Prediction route (router/classifier.py): logs successful prediction_completed summaries at DEBUG, and warnings for invalid images or top_k.

Set verbosity with LOG_LEVEL (default INFO). Example: export LOG_LEVEL=DEBUG. Set the slow-request threshold with SLOW_REQUEST_MS. Terminal log colors use LOG_COLOR=auto by default; set LOG_COLOR=true or LOG_COLOR=false to override.