來源: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個月
複制