Arthas Spring Boot Starter

Support spring boot 2

Latest Version: View

Add maven dependency:

        <dependency>
            <groupId>com.taobao.arthas</groupId>
            <artifactId>arthas-spring-boot-starter</artifactId>
            <version>${arthas.version}</version>
        </dependency>

When the application is started, spring will start arthas and attach its own process.

Configuration properties

For example, by configuring the tunnel server for remote management.

arthas.agent-id=hsehdfsfghhwertyfad
arthas.tunnel-server=ws://47.75.156.201:7777/ws

All supported configuration: Reference

View Endpoint Information

Need to configure spring boot to expose endpoint: Reference.

Assuming the endpoint port is 8080, it can be viewed via the following url.

http://localhost:8080/actuator/arthas

{
    "arthasConfigMap": {
        "agent-id": "hsehdfsfghhwertyfad",
        "tunnel-server": "ws://47.75.156.201:7777/ws",
    }
}

Non-spring boot application usage

Non-Spring Boot applications can be used in the following ways.

        <dependency>
            <groupId>com.taobao.arthas</groupId>
            <artifactId>arthas-agent-attach</artifactId>
            <version>${arthas.version}</version>
        </dependency>
        <dependency>
            <groupId>com.taobao.arthas</groupId>
            <artifactId>arthas-packaging</artifactId>
            <version>${arthas.version}</version>
        </dependency>
import com.taobao.arthas.agent.attach.ArthasAgent;

public class ArthasAttachExample {
	
	public static void main(String[] args) {
		ArthasAgent.attach();
	}

}