來源:https://github.com/JaredTan95/skywalking-tutorials
參考:源碼地址從GitHub下載代碼編譯在IntelliJ IDEA中編譯工程Elasticsearch 啓動:Skywalking 相關配置說明
視頻地址
參考:
- 官方編譯指南
- 芋道源碼
- JaredTan95
源碼地址
https://github.com/apache/incubator-skywalking.git
從GitHub下載代碼編譯
在IntelliJ IDEA中編譯工程
- 準備環境: git, jdk8,Maven
git clone https://github.com/apache/incubator-skywalking.git
cd incubator-skywalking/
git checkout -b 5.x
git submodule init
git submodule update
mvn clean package -DskipTests
- 將
/incubator-skywalking/apm-protocol/apm-network/target/generated-sources/protobuf
目錄下面grpc-java
和java
目錄右鍵設置爲Generated Rources Root
. - 將
apm-collector/apm-collector-remote/apm-remote-grpc-provider/target/generated-sources/protobuf
目錄下面grpc-java
和java
目錄右鍵設置爲Generated Rources Root
.
Elasticsearch 啓動:
https://github.com/JaredTan95/skywalking-docker/blob/master/elasticsearch-5.6.10-Zone-Asia-SH/README.md
Skywalking 相關配置說明
#cluster: # zookeeper: # hostPort: localhost:2181,localhost:2182 #zookeeper集羣地址 # sessionTimeout: 100000 configuration: default: #namespace: xxxxx # alarm threshold applicationApdexThreshold: 2000 #應用性能指數閥值,Apdex含義請參考如下 serviceErrorRateThreshold: 10.00 #服務錯誤率閥值 serviceAverageResponseTimeThreshold: 2000 #服務平均響應時間閥值 instanceErrorRateThreshold: 10.00 #實例錯誤率閥值 instanceAverageResponseTimeThreshold: 2000 #實例平均響應時間閥值 applicationErrorRateThreshold: 10.00 #應用錯誤率閥值 applicationAverageResponseTimeThreshold: 2000 #應用平均響應時間閥值 # thermodynamic thermodynamicResponseTimeStep: 50 #熱力圖響應時間 thermodynamicCountOfResponseTimeSteps: 40 #熱力圖的響應時間步長數量 # max collection's size of worker cache collection, setting it smaller when collector OutOfMemory crashed. workerCacheMaxSize: 10000 #最大工作緩存數量 # Apdex # 性能指數: # Apdex(Application Performance Index)是一個國際通用標準, # Apdex 是用戶對應用性能滿意度的量化值。它提供了一個統一的測量和報告用戶體驗的方法, # 把最終用戶的體驗和應用性能作爲一個完整的指標進行統一度量。 # 如何計算 Apdex:基於“響應性”,Apdex 定義了 3 個用戶滿意度區間( OneAPM 默認定義的 T 值爲 0.5 秒): # 滿意:這樣的響應時間讓用戶感到很愉快,響應時間少於 T 秒鐘。 # 容忍:慢了一點,但還可以接受,繼續這一應用過程,響應時間 T~4T 秒。 # 失望:太慢了,受不了了,用戶決定放棄這個應用,響應時間超過 4T 秒。 storage: elasticsearch: clusterName: elasticsearch #Elasticsearch集羣名稱,默認爲elasticsearch clusterTransportSniffer: false clusterNodes: localhost:9300 #Elasticsearch連接,默認localhost:9300 indexShardsNumber: 2 indexReplicasNumber: 0 highPerformanceMode: true # Batch process setting, refer to https://www.elastic.co/guide/en/elasticsearch/client/java-api/5.5/java-docs-bulk-processor.html bulkActions: 2000 # Execute the bulk every 2000 requests bulkSize: 20 # flush the bulk every 20mb flushInterval: 10 # flush the bulk every 10 seconds whatever the number of requests concurrentRequests: 2 # the number of concurrent requests # Set a timeout on metric data. After the timeout has expired, the metric data will automatically be deleted. traceDataTTL: 90 #追蹤數據滾動刪除週期,默認90分鐘 minuteMetricDataTTL: 90 #分鐘監控數據滾動刪除週期,默認90分鐘 hourMetricDataTTL: 36 #小時監控數據滾動刪除週期,默認36小時 dayMetricDataTTL: 45 #天監控數據滾動刪除週期,默認45天 monthMetricDataTTL: 18 #月監控數據滾動刪除週期,默認18個月