Performance open source project for sky walking listeners

apm (Application Performance Managment: Application Performance Management) shorthand, there are many mature charging tools in the industry, such as Tingyun, OneAPM, etc. Of course, there are also open source apm, git address: https://github.com/wu-sheng/sky-walking. Of course, the functions are incomparable with the charges, but it is also good to know about it. Skywalking uses elasticsearch data storage. Those who know es and have seen the original code of skywalking will definitely say that there are many drawbacks. After all, it is open source. The spirit of sharing and the design architecture are worth learning. I hope it will get better and better. This issue is for V3.1. The collector, web, agent, and es parts are also easy to apply to the project. v3.1 supports es version 5.2x, 5.3x. Official website document wiki address

  1. First build the es download address , select TAR for Mac,

   Unzip:

 

tar -zxvf elasticsearch-5.3.3.tar.gz
 cd elasticsearch-5.3.2

    config below elasticsearch.yml is the configuration file of es 

 

   configuration  cluster.name: myesdb. This name needs to be consistent with the collector configuration file.

    start es

 

./bin/elasticsearch

 2Install and deploy collector

 

     download collector ,

     Unzip the installation package tar -xvf skywalking-collector.tar.gz, Windows users can choose the zip package;

     Set the collector.configconfiguration file in the config directory;

     

#config es (node, multiple comma separated)
es.cluster.nodes=127.0.0.1:9300
#esCluster name
es.cluster.name = myesdb
es.cluster.transport.sniffer = true
#collector The current host name or IP address, please use the real address, the default is 127.0.0.1
cluster.current.hostname = 127.0.0.1
# Listening port.
cluster.current.port = 11800
#RESTful
http.hostname=127.0.0.1
http.port=12800

   start up:

 

./bin/startup.sh
Starting collector....
Collector started successfully!       
Note: Please check whether your JAVA_HOME is configured in the collector-service.sh file, and the name in the .sh file should also correspond to the environment variable

  3 Configure web

    download link

     Unzip tar -xvf skywalking-web.tar.gz The same windows users can choose the zip package;

     Set the collector_config.properties configuration file in the config directory

#collectorService Configuration
collector.servers[0]=127.0.0.1:12800

   Set the application.properties configuration file in the config directory

#web service port
server.port = 8088

   start up

./bin/startup.sh
Starting web service....
Skywalking Web started successfully!

   Open http://localhost:8088/ to see



 

    Blank does not matter, because the agent has not been deployed in the project and no data has been collected, let's start deploying the agent

    document address

    Create the sky-walking.config file in the same directory as agent.jar according to the documentation

  

# The current application code will eventually be displayed on the webui.
# It is recommended that multiple instances of an application use the same application_code. Please use English
agent.application_code=myproject

# The default is 1, which means to start the sampling mechanism, that is, each call chain will be tracked and reported
# When it is greater than 1, it means that one report is reported every N visits.
# Less than or equal to 0 is illegal.
agent.sampling_cycle=1

# Collector REST-Service service address.
#eg
# Single node configuration: SERVERS="127.0.0.1:8080"
# Cluster configuration: SERVERS="10.2.45.126:8080,10.2.45.127:7600"
collector.servers=127.0.0.1:12800

# Collector accepts tracking information REST-Service service name.
# No need to modify by default
collector.service_name=/segments

# When sending data to the collector, the maximum capacity of a single call
collector.batch_size=50

# Internal buffer pool size, this value must be an exponential multiple of 2.
# Related information: https://github.com/LMAX-Exchange/disruptor
buffer.size=512

# log file name
logging.file_name=skywalking-api.log

# log file path
# Default is empty, use "system.out" to output log, usually output to middleware or application console log.
logging.dir=

# log file maximum size
# If this size is exceeded, a new file will be generated.
# Default is 300M
logging.max_file_size=314572800

# Log level, default is DEBUG.
logging.level=DEBUG
    Start our project

 

    

 java -javaagent:/Users/xxx/java/software/skywalking-agent.jar -jar  wp-xx-SNAPSHOT-exec.jar --server.port=8081 

 

 访问我们项目产生访问数据,刷新我们skywalking-web 页面 看到数据呈现效果:



 同样我们可以观察某次请求结果



 

以上是整个部署后的效果,其中很多程序在ping redis,检测线程的可用性。然后几分钟后统计了下es里的数据条数,没有正常访问数据的情况下产生了近 "hits": {"total": 13487, 条数据,用在生成环境堪忧,esindex没有按照规定生成,后期数据处理的话,很费劲。感谢开源,感谢分享,一些测试环境排查问题还是不错的。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326334098&siteId=291194637