Posts

Showing posts from February, 2021

Overview and practical use cases with open source tracing tool for Java Apps. In-house devs

Image
  This example comes from internal development, in fact, this is often the case with applications from the marketplace.atlassian.com. One morning, looking at the charts, I saw how slow and repetitive the requests are, which often indicate automation and integration. Having clicked on the requests, I saw that almost all of them refer to the rest endpoint below. And right away by clicking on the flamegraph, we can easily find the roots, all these heavy requests and allocated memory. Then I got a trace to the method, and I see that 80 percent comes fromIssueToJiraExtranetIssue method. Since this is a jar file by IntellIJ Idea, we find interesting points. In the following piece of code, Line 422, issueRequest.getMax () is not a desirable practice Line 427 points to the jiraExtranetIssue class, which has a huge number of fields. As a result, the next step was refactoring class fields, review loop.  As optional info, please, checkout the next article. https://blog.gceasy.io/2019/11/06/memory

Overview and practical use cases with open source tracing tool for Java Apps. Glowroot. Installation

Image
In that small article, you can find how to install the agent of Glowroot. Installation of the application is quite simple on agents, and this article shows a scheme for working with a built-in collector, but for industrial installations we use it with a bundle with elasticsearch. The installation can be both for individual nodes and so for the central collector. In this case, consider for a separate node. Prerequisites: {jira_home} - is location of Jira home directory. {jira_installation_directory} is the location of Jira installation directory.   Steps: Downloading the installer wget -c https://github.com/glowroot/glowroot/releases/download/v0.13.6/glowroot-0.13.6-dist.zip To check, create a directory via command   mkdir -p /{jira_home}/glowroot/tmp Let the Jira process write and set ownership for simplicity, but it is recommended that you just give the write ability to the owner of the Jira process. chown -R jira: /{jira_home}/glowroot We additionally set the argument to setenv.sh in

Overview and practical use cases with open source tracing tool for Java Apps. GlowRoot.

Image
  In this series of articles, I will tell the story of how you can face a rather simple problem precisely on large installations in Atlassian products, in particular on Jira. The methods for analyzing and finding bottlenecks are: statistics sampling  profiling or tracing   I hope the idea of sampling is clear.   Also, I do recommend reading the post from Dan Luu ( https://danluu.com/perf-tracing/ ). I will do more with the aspect of tracing requests, which shows almost the entire segment of the request, namely from the beginning of the request from the client's browser, to the transition to the reverse proxy, if it exists, to the application server and from it to caches, Lucene search indexes, DBMS. To analyze the system on the part of the customer, there were strict requirements for the use of tools.   Requirements  The first criterion was the price, especially during the pandemic, and it was not budgeted, so the main criterion was for the open-source review. Because the next aspe