From 5939f27e27facc2f1a96661dc04a652c20a9ca4b Mon Sep 17 00:00:00 2001 From: Steve Waterworth Date: Tue, 16 Jul 2019 13:06:37 +0100 Subject: [PATCH] Prometheus usage --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 3fb3d3e..9c8f459 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,23 @@ A separate load generation utility is provided in the *load-gen* directory. This To enable End User Monitoring (EUM) see the official [documentation](https://docs.instana.io/products/website_monitoring/) for how to create a configuration. There is no need to inject the javascript fragment into the page, this will be handled automatically. Just make a note of the unique key and set the environment variable INSTANA_EUM_KEY for the *web* image, see *docker-compose.yaml* for an example. If you are running the Instana backend on premise, you will also need to set the Reporting URL to your local instance. Set the environment variable INSTANA_EUM_REPORTING_URL as above. See the Instana EUM API [reference](https://docs.instana.io/products/website_monitoring/api/#api-structure) + +## Prometheus + +The cart and payment services both have Prometheus metric endpoints. These are accessible on `/metrics`. The cart service provides: + +* Counter of the number of items added to the cart + +The payment services provides: + +* Counter of the number of items perchased +* Histogram of the total number of items in each cart +* Histogram of the total value of each cart + +To test the metrics use: + +```shell +$ curl http://:8080/api/cart/metrics +$ curl http://:8080/api/payment/metrics +``` +