dserikov07
(Danik Serikov)
November 27, 2024, 7:53am
1
In the CUBA Platform, there was a tool called Perfstat that allowed us to monitor performance by showing how long methods like init, ready, and others took in seconds.
Is there a similar tool or feature available in Jmix 2 to track and analyze performance metrics like this? If not, what are the recommended approaches for performance monitoring in Jmix 2?
Thanks in advance for your help!
i.gavrilov
(Ivan Gavrilov)
November 28, 2024, 6:51am
3
Hi.
There is a monitoring metrics for View and DataLoader lifecycle (Monitoring loader in screens · Issue #1704 · jmix-framework/jmix · GitHub ).
You need to add Actuator and Prometheus dependencies
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
And expose endpoints via app property
management.endpoints.web.exposure.include=prometheus,health,info,metrics
Then go to /actuator/prometheus to check metrics or use some external UI to visualize.
Regards,
Ivan
Hi Ivan,
I am trying to use Actuator and Prometheus.
Since I have configured a webContextName “app”, the endpoint to check the metrics should be
http://localhost:8080/app/actuator/prometheus
But it does not work because it answers with HTTP 302 and then redirects me to the main application http://localhost:8080/app/
If i try without the context, http://localhost:8080/actuator/prometheus i get an HTTP 404 not found.
Can you help me to understand the problem?
Thank you anyway
Dario
Hi Ivan,
I answer in order:
I am using cuba.webContextName = app
No, I am not able to run /health or /actuator
I am using CUBA 7.2 actually, I am realizing that I am in the wrong place.
Can you tell me is it possible to use actuator even with CUBA ?
Thank you,
Dario
i.gavrilov
(Ivan Gavrilov)
January 23, 2025, 2:48pm
7
Hi Dario,
Actuator is a String Boot feature.
In case of CUBA you can use perfstat logs:
You can find perfstat.log and perfstat-ui.log files in your deploy folder.
Or you can get access to them via application UI: Administration → Server Log and select log file.
Regards,
Ivan