Usecases

Consider the below usecases where tracing helped to improve performance of the JasperReports Server application.

Running a report but the execution is taking too long

When running a report in JasperReports Server, Scheduler took longer duration than usual to run a report, which resulted in performance issues in JasperReports Server.

We examined Tomcat logs to find out the issue, but couldn’t detect anything in the Tomcat logs. This issue was later detected on enabling tracing. Enabling tracing helped to detect the slow queries by capturing the exact places (spans) and the time spent in each major code area.

The following figure shows an example of the errors captured for the JasperReports Server Schedular in Jaeger UI along with logs. The red color ball indicates the list of errors captured in Jaeger UI. On expanding the logs of this error, you can see the exception caused in each logs along with the traces. In this way all the hidden errors which remained undetected in Tomcat logs were found in Jaeger UI.

Example of Error Captured by OpenTelemetry in Jaeger UI

Example of Logs Captured by OpenTelemetry in Jaeger UI

Running a report but the Input Controls dialog is opening for too long

When running a report in JasperReports Server, the Input Controls dialog remained open for too long, which resulted in slow performance of JasperReports Server application. We examined Tomcat logs to find out the issue, but couldn’t detect anything in the Tomcat logs. This issue was later detected on enabling tracing.

Enabling tracing helped in capturing how much time was spent executing SQL queries for the Input Controls, to see how much time it took to resolve all the values and deliver them back in the REST API response.

To enable tracing you need to configure Opentelemetry and Jaegar agent on JRS application and cluster. For more information, refer to Configuring OpenTelemetry and Jaegar Agent.