opendatacube / datacube-wps

Web Processing Service running on opendatacube
Other
7 stars 3 forks source link

Prometheus and App start up failure #117

Closed whatnick closed 2 years ago

whatnick commented 3 years ago

Expected behaviour

Prometheus metrics exist

Actual behaviour

Intermittently prometheus interferes with app startup Please add error log here @mmochan

benjimin commented 2 years ago

So this app is supposed to use prometheus-flask-exporter. Usually this will expose such metrics as a cumulative histogram _flask_http_request_durationseconds, and counts _flask_http_requesttotal and _flask_http_request_exceptionstotal. These metrics seem intended to be labelled by endpoint, and with a further custom metric intended to provide a full url? (If deployed in a kubernetes cluster that uses e.g. cAdvisor, then there will additionally be general metrics available elsewhere such as the container CPU time, memory and data transfer.)

The metrics are usually exposed at /metrics, not sure yet how this interacts if other OWS services are deployed to the same domain as the /wps? Apparently the exporter needs additional complexity to handle multiprocessing, gunicorn, and WSGI..

benjimin commented 2 years ago

Prometheus metrics appear to be working now..