Microservice Statistics

Hi experts!

Cumulocity.com 10.18

is there an API to get an statistical overview of Microservices utilisation? I mean how many requests were processed, CPU MEM util?

Thanks and kind Regards,

Marco

There is a nice (newish?) app, called “Usage Statistics” which gives to you a good overview of usage statistics in a tenant (e.g. devices, and microservices). So that might help you out if you just want to monitor if anything is misbehaving.

I just installed it on my tenant via the Administration → Applications menu:

Here is an example of the microservice monitoring:

I’m not sure if you can get an API (though you could probably have a look at the browser’s API requests to see where it is getting this information from).

If you need fine-grain control over your microservice then I would recommend using a prometheus or OpenTelemetry endpoint where you can generally gather more microservice specific information like number of requests per REST API (of the microservice) etc…

2 Likes

Thanks Reuben,

I know the statistics app, but the information is not enough to analyse the actual load (Requests/Timeframe, Burst etc.). The customer has a lot of Microservices that he wants to consolidate/cluster into fewer to save cost. I will suggest to build a Telemetry Endpoint that you suggested.

Kind Regards,

Marco

@Marco_Stoffel For Prometheus, there is an example in the microservices template project:

If you are going to use Open Telemetry, which I think gives you more metrics out of the box if you are using Spring Boot, it would be great if you could share this with the community.

Also there is a guide about microservice monitoring and collect these metrics you’ve mentioned Marco.

Out of the box the Java Microservice SDK provides a Prometheus endpoint which can be extend with custom metrics like requests etc. In the article there is an example about that.