Exporting Glowroot Reports from Production Servers to Developer Environments

glowroot-report-export

Glowroot APM is a powerful tool used to monitor the performance of Java applications. It’s often installed as a Java agent on production servers to capture detailed telemetry, including CPU usage, memory consumption, and slow SQL queries.

However, Glowroot does not natively support exporting its UI reports. This poses a challenge in typical scenarios where a production issue is escalated to R&D, but developers are restricted from accessing the client’s production environment due to sensitive or confidential data.

The Use Case

When a performance degradation is detected in a live application:

  • The operations team installs Glowroot on the client’s server.
  • A support case is created and escalated to the R&D team.
  • Developers need access to Glowroot’s data without accessing the client’s infrastructure.

Unfortunately, while Glowroot allows exporting metrics like CPU or memory usage in CSV format, it does not support exporting detailed insights like:

  • High-cost SQL queries
  • Startup timing
  • Full request traces

So, how can developers review the same UI and data available on the production server?

The Workaround: Copying Glowroot Data for Offline Viewing

Here’s a practical method to transfer Glowroot data from production to a developer’s environment securely.

Step 1: Locate the Glowroot Folder on the Production Server

Navigate to the directory where glowroot.jar is located on the production server. This is typically the same path defined by the -javaagent:<path> argument used to launch the Java application (e.g., in Tomcat, systemd service, or startup script).

Step 2: Copy the Glowroot Folder

Make a copy of the entire glowroot/ folder. This ensures:

  • The production server remains unaffected
  • You avoid locking issues that prevent compression tools from zipping active files

Step 3: Compress and Share with Developers

Compress the copied folder using .zip, .7z, or any archive format. Send this archive to the R&D or development team securely.

The key folder is glowroot/data/, which contains .db files storing all collected performance data.

Step 4: Run Glowroot in Offline Mode on Developer’s Machine

Once the developer receives and extracts the archive:

  1. Open a terminal or PowerShell.
  2. Navigate to the unzipped folder.
  3. Run the following command:
java -jar glowroot.jar

You should see output similar to:

2025-05-19 09:48:48.310 INFO  org.glowroot - Glowroot version: 0.13.6, built 2020-03-01 01:25:31 +0000
2025-05-19 09:48:48.326 INFO  org.glowroot - Java version: 17.0.14 (Eclipse Adoptium / Windows 10)
2025-05-19 09:48:49.318 INFO  org.glowroot - Offline viewer listening on 0.0.0.0:4000

Step 5: Access the UI Locally

Open your browser and go to: http://localhost:4000 You will now see the same Glowroot UI with all the performance data as it appeared on the production server.

Conclusion

While Glowroot doesn’t support direct report exports, this workaround enables secure and effective transfer of performance data from production to development environments. This is especially useful when sensitive environments restrict direct developer access.

By copying and running Glowroot offline, R&D teams can conduct thorough investigations, identify performance bottlenecks, and propose solutions—all without touching the production infrastructure.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *