在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
EaseAgentAn agent component for Java system. OverviewPurpose
Principles
Architecture DiagramDescriptionInstrumenting the method base on Byte buddy technology. net.bytebuddy.asm.Advice.OnMethodEnter, net.bytebuddy.asm.Advice.OnMethodExit
Features
QuickStartDownloadDownload or $ curl -Lk https://github.com/megaease/easeagent/releases/download/{tag}/easeagent.jar -O Build From SourceDownload EaseAgent with $ cd easeagent$ mvn clean package -am -pl build The
Step 1Extracting the default configuration file. $ jar xf easeagent.jar agent.properties log4j2.xml Step 2
name=[app-name]
observability.outputServer.bootstrapServer = [ip:port]
# metric outputobservability.metrics.[xxxx].appendType=console# tracings outputobservability.tracings.output.enabled=false
# [zipkin]: send data to zipkin server# [system]: send data to kafkaobservability.tracings.output.target=zipkin# send data to zipkin serverobservability.tracings.output.target.zipkinUrl=http://localhost:9411/api/v2/spans Step 3Building the demo application. $ git clone https://github.com/akwei/spring-petclinic-microservices.git$ cd spring-petclinic-microservices$ mvn -DskipTests=true package Step 4Run the demo application with EaseAgent. # Open another console$ java -jar spring-petclinic-config-server/target/spring-petclinic-config-server-2.4.2.jar# Open another console$ java -jar spring-petclinic-discovery-server/target/spring-petclinic-discovery-server-2.4.2.jar# Open another console$ export EASE_AGENT_PATH=[Replace with agent path]$ java "-javaagent:${EASE_AGENT_PATH}/easeagent-dep.jar=${EASE_AGENT_PATH}/agent.properties" -Deaseagent.server.port=9900 -jar spring-petclinic-vets-service/target/spring-petclinic-vets-service-2.4.2.jar# Open another console$ export EASE_AGENT_PATH=[Replace with agent path]$ java "-javaagent:${EASE_AGENT_PATH}/easeagent-dep.jar=${EASE_AGENT_PATH}/agent.properties" -Deaseagent.server.port=9901 -jar spring-petclinic-visits-service/target/spring-petclinic-visits-service-2.4.2.jar# Open another console$ export EASE_AGENT_PATH=/[Replace with agent path]$ java "-javaagent:${EASE_AGENT_PATH}/easeagent-dep.jar=${EASE_AGENT_PATH}/agent.properties" -Deaseagent.server.port=9902 -jar spring-petclinic-customers-service/target/spring-petclinic-customers-service-2.4.2.jar# Open another console$ export EASE_AGENT_PATH=[Replace with agent path]$ java "-javaagent:${EASE_AGENT_PATH}/easeagent-dep.jar=${EASE_AGENT_PATH}/agent.properties" -Deaseagent.server.port=9903 -jar spring-petclinic-api-gateway/target/spring-petclinic-api-gateway-2.4.2.jar Step 5Adding the following configuration in - job_name: 'petclinic-vets-service' static_configs: - targets: ['localhost:9900'] metrics_path: "/prometheus/metrics" - job_name: 'petclinic-visits-service' static_configs: - targets: ['localhost:9901'] metrics_path: "/prometheus/metrics" - job_name: 'petclinic-customers-service' static_configs: - targets: ['localhost:9902'] metrics_path: "/prometheus/metrics" - job_name: 'petclinic-api-gateway' static_configs: - targets: ['localhost:9903'] metrics_path: "/prometheus/metrics" Start Prometheus $ ./prometheus --config.file=prometheus.yml Step 6Open Browser to visit http://localhost:8080. After visit more pages, open Prometheus manager http://localhost:9090, and search User ManualFor more information, please refer to the User Manual. Development GuideRefer to Development-Guide. LicensesEaseAgent is licensed under the Apache License, Version 2.0. See LICENSE for the full license text. |
请发表评论