Open cessda-bitbucket-importer opened 3 years ago
Original comment by Joshua Tetteh Ocansey (GitHub: Joshocan).
Metrics Expose implementation with cdc-indexer as an example using micrometer
Original comment by Joshua Tetteh Ocansey (GitHub: Joshocan).
Guide to instrument application using Prometheus client library in Java. You can either implement Counter or Histogram metrics. Check this for Best practices for Instrumentation
Exposed as of https://github.com/cessda/cessda.cvs.deploy/commit/e9b2e6b98861f555629865b2a25debb20b813741
Custom metrics have not been integrated yet.
For which group are the metrics intended? And should users even know about these metrics?
@Lorenz1983 I am not sure which groups are interested for these metrics, but definitely not user group. This will be better to ask John @john-shepherdson. We didn't work on it, because that time we were overloaded with the new workflow and new versioning system.
Some metrics are useful for the operators of the service as it can be used to alert on service malfunctions (e.g. response times longer than 1s)
@pakoselo @matthew-morris-cessda Thanks for the response. Please implement the following points as already mentioned above: What to measure: Number of CVs Downloaded per format Number of CVs Downloaded per language Time in seconds used for CVs downloads Number of CVs uploaded per format by whom Number of CVs uploaded per language by whom
@Lorenz1983 I am not sure that it will go so fast and we need tothink how much time it will consume.
@pakoselo Thanks for the information. If it doesn't work out for the 3.4.0 release, I'll remove the milestone and take it into account for the next release. But please let me know how long it will take. Thank you very much.
This is hard to properly estimate how long it will take. My guess is around 1PM. If there's a requirement on providing the collected metrics not just as a raw text-based data but visually in a form of graphs, Grafana or other compatible tool should be deployed and configured as well along with the Prometheus server. In addition to this, such tool should be secured and restricted to be accessible to specific users only.
CESSDA has already got the infrastructure in place for Observability (see https://docs.tech.cessda.eu/technical-infrastructure/observability/index.html). This is about instrumenting CVS so that the data can be collected and processed by it. So no need to take into account Prometheus, Grafana etc in this issue.
That makes things easier. It would help, if we can take a look on how some other CESSDA product is instrumented as an example. Is there such a case? @matthew-morris-cessda
Original report on BitBucket by Joshua Tetteh Ocansey (GitHub: Joshocan).
There is an example here as a guide https://github.com/prometheus/client_java
You can also follow the detail for instrumenting and exposing metrics from the Prometheus official github guide.
Note: Expose it as /metrics
What to measure: