bcgov / Sustainment-Team

Use of this repository is for tracking Sustainment Team Issues. It is used to account for the Sustainment Team's work that is not attached to a specific digital service.
0 stars 0 forks source link

Investigate into Wally usage tracking #18

Closed jakemorr closed 1 month ago

jakemorr commented 1 month ago

Describe the task an investigation on if wally has any type of usage data we can give access to or get for the service owner.

Any data we can provide on how many active users wally has, how often they are using the application on average and how many reports are generated over a given time period would be valuable. any other usage related data could be useful too if found.

if there is nothing tracking usage data right now, we will want to investigate possible ways to collect such data in the simplest way.

Purpose the service owner is currently gathering information for the ministry to make a decision on which Water Allocation Tool should be rolled out province wide

Acceptance Criteria

Additional context

Keegnan commented 1 month ago

Could be a good first issue.

Keegnan commented 1 month ago

Ideally to be ready by Friday, July 26th (if possible).

sggerard commented 1 month ago

WALLY definitely had Motomo installed for tracking analytics. However only currently the motomo db pod is running and the motomo proxy and analytics pods don't appear to have run in a long time. Will investigate if we can get these pods running again. https://github.com/BCDevOps/matomo-openshift/tree/master

WALLY also appears to use https://github.com/stephenhillier/starlette_exporter and can export metrics that could be consumed by a prometheus deployment on the /metrics endpoint. This doesn't appear to be used currently, and I haven't been able to check the endpoint yet as I do not have permission. Relevant code: https://github.com/bcgov/WALLY/blob/eae559720c25642a83e2a51ba99c8b5276d2cfad/backend/main.py#L13

sggerard commented 1 month ago

Motomo appears to be broken as it's pulling the image from the wrong URL. See relevant PR with the correct URL https://github.com/BCDevOps/matomo-openshift/commit/6b826fa514ca91266d946fae53738db7bce9672d

sggerard commented 1 month ago

The frontend is trying to call motomo, so likely just need to get the pod running and motomo will be tracking analytics again.

By port forwarding the api I was able to hit the /metrics endpoint. (oc port-forward wally-production-api-41-hp7bd 8000:8000). I needed to do this for both pods. It looks like these pods have been running since Feb 27th.

Metrics.txt

metrics2.txt

sggerard commented 1 month ago

Have created ticket to fix the Matomo deployment