Skip to content

Report real model health from /status and expose Prometheus metrics #8

Description

@jzonthemtn

/status returns the literal string healthy with no check behind it, so it proves the Flask process is serving and nothing more. It cannot distinguish a loaded, working model from a broken one. PhEye also exposes no metrics of any kind.

This surfaced while building the Philterd Appliance console. PhEye does the actual detection work, so inference latency and throughput are the numbers most likely to explain a slow redaction, and none of them are visible today.

Acceptance Criteria

  • /status verifies the loaded model can serve a request rather than returning a constant
  • /status returns a non-2xx status when the model is not usable
  • /status returns JSON that includes the identifier of the loaded model
  • A metrics endpoint exposes Prometheus text format
  • Metrics include request count and error count for /find
  • Metrics include an inference latency histogram for /find
  • Metrics carry the loaded model identifier as a label
  • Both endpoints are documented in the README
  • The change to the /status response body is called out as breaking in the changelog

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions