How does tracing requests with open-source Glowroot help the Atlassian engineer?

In this article, I will tell a story about how you can face a rather simple problem on large installations of Atlassian products, in particular on Jira. 





Methods for analyzing and finding bottlenecks:





  1. statistics





  2. sampling





  3. profiling and tracing





In this article, we will analyze the request trace, 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. 





An important point is that it is difficult to analyze the system on the part of the customer, since they had strict requirements for the use of the tools that are listed in the requirements.





Requirements 

APM- ( ) , . โ€” . , , open source . โ€” , .









  • ;





  • (On-Premise);





  • ;





  • Elasticsearch (Opendistro);





  • JVM ( Atlassian , Java), javaagent;





  • HTTP c SQL-;





  • ;





, , . , 12 , 1 . . , . 





schedule

https://openapm.io/landscape, APM-. Glowroot, .





 

, , Cassandra ( ) Elasticsearch.









wget -c https://github.com/glowroot/glowroot/releases/download/v0.13.6/glowroot-0.13.6-dist.zip
      
      



2. mkdir -p /jira/glowroot/tmp, Jira , , Jira





chown -R jira: /jira/home/glowroot
      
      



3. setenv.sh jira, /jira/current/bin. , /opt/atlassian/jira/bin :





JVM_SUPPORT_RECOMMENDED_ARGS="-javaagent:/jira/glowroot/glowroot.jar ${JVM_SUPPORT_RECOMMENDED_ARGS}"
      
      



4. : 





systemctl restart jira
      
      



:





tail -f {jira_installation_directory}/logs/catalina.out 
      
      



127.0.0.1, glowroot , , admin.json. bindAddress 0.0.0.0 . contextPath - /glowroot





reverse proxy ( nginx), :





location /glowroot {                 
		proxy_pass http://127.0.0.1:4000; 
}
      
      



Agent-Installation-(with-Embedded-Collector)





, jira.example.com/glowroot .





, . 





, , , . 





,

glowroot , 30000, . trace, .





, PostgreSQL, PostgreSQL IOPS.





glowroot in action
glowroot

โ€” Jira , thread dump , .





stacktrace , .





piece of trace

stacktrace , createTemporaryTablesIfNeeded





https://bitbucket.org/atlassian/entity-engine/pull-requests/32/stable-issue-stable-issue-raid-438-in/diff, .





that's how we found the restrictions

. .





entity engine, , . 





, . 





:













  • unlogged cwd_users PostgreSQL





, ? , , ? , ? 





, Atlassian .





, .





  • https://glowroot.org/





  • Admin monitoring tools





  • TechFest with Ontico





  • openapm.io/landscape








All Articles