ITISFoundation / osparc-simcore

🐼 osparc-simcore simulation framework
https://osparc.io
MIT License
46 stars 27 forks source link

Metrics: "Average number of logins per month to oSPARC averaged over the quarter reported on" #3471

Open elisabettai opened 2 years ago

elisabettai commented 2 years ago

Creating this issue to collect all the information regarding this metric. I guess they want to know on average how many logins we have per month.

In Grafana (AWS prod) we have a graph that doesn't make a lot of sense.

image

At least, in march the graph was continuous (I got the one below from here) image

The query used is: sum by (endpoint) (rate(http_requests_total{endpoint=~"/v0/me", http_status=~"2[0-9]+", app_name=~".+webserver"}[30d]))*60*60*24*30 The same query in Prometheus gives a different graph. image

@sanderegg, @mrnicegyu11 does the graph in Prometheus make sense to you? I guess we'll need to fix it in Grafana.

Also, I was thinking that we can use the endpoint "/v0/auth/login" (which doesn't seem to be triggered twice as "/v0/me"). Anything speaks against this?

sanderegg commented 2 years ago

@elisabettai : concerning the graph in grafana, I am aware that the display in grafana has an issue because that metric is created at long intervals. something like every hour or so. and it seems grafana is not happy with it.

concerning the /v0/auth/login it depends what we want to show:

sanderegg commented 2 years ago

@elisabettai : also the fact that the /me is triggered twice seems to be a bug. One option could be also that we define a specific metric with very well defined properties (then we could potentially test it to prevent it from going wrong).

elisabettai commented 2 years ago

A specific metric with well defined properties sounds like the cleaner solution. Where can we start from? Does this require change in simcore code?

I am also OK continuing using the existing one http_requests_total{endpoint=~"/v0/me", http_status=~"2[0-9]+", app_name=~".+webserver", unless in your experience that causes troubles (apart from the bug that it is triggered twice).

sanderegg commented 5 months ago

@elisabettai we can close this right?