Source | alibaba cloud native public number
Arthas Star hits 25,000
- Open source address:https://github.com/alibaba/arthas
- Documents:https://arthas.aliyun.com/doc/
With the popularity of microservices, applications are becoming more lightweight and efficient, but the dilemma is that online troubleshooting becomes more and more complicated. Traditional Java troubleshooting, you need to restart the application for debugging, but after the restart of the application will be lost, the problem is difficult to recurrence.
So since September 2018, Alibaba has opened source Arthas, a tried-and-true diagnostic app that developers love.
Arthas’s innovative bytecode weaving technology enables efficient troubleshooting by viewing call context without requiring a restart. Combined with the flame chart, you can directly locate hot spots and find performance bottlenecks. Through bytecode replacement, online hot update code is realized. Supports both black screen and white screen diagnosis, and connects to large-scale diagnosis clusters.
In May 2020, we did a review of Arthas Star breaking 20,000:
- Excellence | open-source application diagnostic tool Arthas making Star break through twenty thousand
Winter turned to spring, and a year later Arthas had more than 25,000 stars
Here’s a review of Arthas’s data and work over the past year.
Arthas data for the past year
Arthas Github Star = 2.5W
2. Arthas Github polymorphism
Arthas has grown from 85 open source contributors to 119 thanks for their work:
3. Arthas registered companies increased from 117 to 151
In the past year, Arthas in the industrial and commercial bank, the central bank, PiaoPiao technology, shell find room, bettas production scenarios such as landing, welcome more user registration: https://github.com/alibaba/arthas/issues/111.
- Industrial and Commercial Bank of China to build online diagnostic platform exploration and practice
Arthas Online tutorials 133,996 learners and 51,798 hours of study
The average experience lasts more than 23 minutes.
5. Arthas ZIP monthly average 6.5w downloads
With the launch of the new Arthas website, we count an average of 65,000 Arthas ZIP downloads per month. So, conservatively, Arthas diagnoses an average of 6W+ machines per month.
6. Arthas is ranked 6th in ATA’s annual Technology Search rankings
ATA, alibaba’s internal technology forum, publishes the annual Top 100 search terms and Arthas is the only non-group specific product to make the top 10 as a Java diagnostic tool. Arthas’ popularity within Ali is a measure of this.
Arthas’s work over the past year
Arthas has made a number of improvements with 19 releases in the past year, some of which are highlighted below:
- The new Bytekit bytecode enhancement framework
- Complete support for HTTP API, all commands are complete adaptation
- The Tenlet/WebSocket/HTTP API supports a unified authentication scheme
- New hot update command retransform
- The Tunnel Server supports cluster deployment, flame diagram viewing, and flow computing applications
- Add the arthas-spring-boot-starter module and support for an endpoint that allows users to programmatically import arthas
- Arthas.aliyun.com is launched to better serve domestic users
1. The new Bytekit bytecode enhancement framework
Github:https://github.com/alibaba/bytekit
The Bytekit framework can be used to implement bytecode enhancement through concise annotations.
- Rich injection point support
- Dynamic Binding
- Programmable exception handling
- For example, to enhance the function entry:
public static class SampleInterceptor {
@AtEnter(inline = true, suppress = RuntimeException.class,
suppressHandler = PrintExceptionSuppressHandler.class)
public static void atEnter(@Binding.This Object object,
@Binding.Class Object clazz,
@Binding.Args Object[] args,
@Binding.MethodName String methodName,
@Binding.MethodDesc String methodDesc) {
System.out.println("atEnter, args[0]: " + args[0]);
}
Copy the code
- The inline support
- InvokeOrigin technology
For example, insert APM code into Dubbo Filter:
@Instrument(Interface = "org.apache.dubbo.rpc.Filter")
public abstract class DubboFilter_APM {
public Result invoke(Invoker<?> invoker, Invocation invocation)
throws RpcException {
System.err.println("invoker class: " +
this.getClass().getName());
Result result = InstrumentApi.invokeOrigin();
return result;
}
}
Copy the code
Arthas through the Bytekit framework:
- Fixed an issue where multiple Watch /trace commands would duplicate a class
- Unified use of a single Transformer to resolve multiple enhanced command conflicts
- Dynamically enhanced watch/trace commands can work together by specifying ListenerId
2. HTTP API support
- https://arthas.aliyun.com/doc/http-api.html
The Http API provides RESTful interaction interfaces. The request and response are in JSON format. Http apis can provide structured data and support more complex interactions than Telnet/WebConsole outputs unstructured text data.
3. Unified authentication
Nowadays, application security is getting more and more attention. Therefore, diagnostic tools should not only improve diagnostic efficiency, but also pay attention to their own security. Arthas added the auth command and unified Telnet/WebSocket/HTTP API authentication, see:
- https://arthas.aliyun.com/doc/auth.html
4. New hot update command retransform
- https://arthas.aliyun.com/doc/retransform.html
Re-define in Arthas already supports hot updates, but it can easily clash with JAD or other Java agents. Therefore, we developed a new retransform command.
The retransform command is implemented under the same mechanism as the watch/trace command, etc. If more than one command is executed on the same class, the following processing occurs:
Retransform command -> watch command -> trace commandCopy the code
As you can see, the retransform command does not affect the watch/trace command.
5. The Tunnel Server supports cluster deployment
- https://arthas.aliyun.com/doc/tunnel.html
Arthas Tunnel Server/Client is used to remotely manage and connect multiple Agents. New functions of the Tunnel Server:
- Supports cluster deployment and Redis storage
- Support HTTP Proxy, view the flame chart
6. arthas-spring-boot-starter
- https://arthas.aliyun.com/doc/spring-boot-starter.html
Through arthas-spring-boot-starter, users can directly introduce arthas programmatically. Combined with Tunnel Server, arthas can be easily clustered.
7. New arthas.aliyun.com
- https://arthas.aliyun.com/
Previously, Arthas documents were kept under the github IO domain name and were frequently inaccessible. To improve access speed, we built a new website that makes it easier for users to access documents and download Arthas.
Arthas prize-winning essay contest
Arthas has received over 30 entries in seven installments. Here are some of the best entries:
- Industrial and Commercial Bank of China to build online diagnostic platform exploration and practice
- Spring Boot Microservice performance down 90%! Use Arthas to locate the root cause
- Who’s calling me? Arthas + JProfiler for complex link analysis
- Arthas locates Dubbo manual registration Eureka exception
- Use Arthas to diagnose HBase abnormal processes
The prize-winning essay contest is continuing, welcome to share ~
Submissions address: http://alibabacloud.mikecrm.com/9khcRrs
Arthas planning
Last year, we laid out three goals:
- RESTful API support
- The new bytecode framework ByteKit
- Plug-in support
In fact, 2.5 were completed, including plug-in support, which we incubated as a new One Java Agent project to implement.
- Github.com/alibaba/one…
Objectives of the One Java Agent project:
- Provides plug-in support and manages numerous Java Agents in a unified manner
- The plug-in supports install/ Unstall and requires the plug-in side to implement the interface
- Supports traditional Java Agents, that is, developed Java Agents
Arthas has over 1200 issues on Github since opening source, and we recently reclaimed the first Issue:
We are constantly improving Arthas’ ease of use as we continue to enhance features.
- Constantly improve the help documentation
- Launch arthas.aliyun.com to improve access speed for domestic users
- Prepare interactive online tutorials for most commands
We believe: give a rose hand, lingering fragrance, thank the majority of users for their support and love.
Arthas 57 hands-on experiments at start.aliyun.com: start.aliyun.com/handson-lab…
Arthas Experimental preview