Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
润土的好友猹
SkyWalking
提交
a3ae7b4d
S
SkyWalking
项目概览
润土的好友猹
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a3ae7b4d
编写于
7月 06, 2020
作者:
A
Ax1an
提交者:
GitHub
7月 06, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix no data bug of oap self observability instance_metrics_second_aggregation metrics. (#5028)
上级
80a534b1
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
29 deletion
+21
-29
docs/en/setup/backend/grafana.json
docs/en/setup/backend/grafana.json
+1
-1
oap-server/server-bootstrap/src/main/resources/fetcher-prom-rules/self.yaml
...bootstrap/src/main/resources/fetcher-prom-rules/self.yaml
+2
-2
oap-server/server-bootstrap/src/main/resources/oc-rules/oap.yaml
...ver/server-bootstrap/src/main/resources/oc-rules/oap.yaml
+2
-2
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsAggregateWorker.java
...p/server/core/analysis/worker/MetricsAggregateWorker.java
+1
-1
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
.../server/core/analysis/worker/MetricsPersistentWorker.java
+14
-0
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsStreamProcessor.java
...p/server/core/analysis/worker/MetricsStreamProcessor.java
+1
-1
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsTransWorker.java
...g/oap/server/core/analysis/worker/MetricsTransWorker.java
+0
-22
未找到文件。
docs/en/setup/backend/grafana.json
浏览文件 @
a3ae7b4d
...
...
@@ -766,7 +766,7 @@
"steppedLine"
:
false
,
"targets"
:
[
{
"expr"
:
"sum(rate(metrics_aggregation {dimensionality=
\"
min
\"
} [1m])) by (level)"
,
"expr"
:
"sum(rate(metrics_aggregation {dimensionality=
\"
min
ute
\"
} [1m])) by (level)"
,
"format"
:
"time_series"
,
"hide"
:
false
,
"intervalFactor"
:
1
,
...
...
oap-server/server-bootstrap/src/main/resources/fetcher-prom-rules/self.yaml
浏览文件 @
a3ae7b4d
...
...
@@ -216,7 +216,7 @@ metricsRules:
range
:
PT1M
labelFilter
:
-
key
:
dimensionality
options
:
[
"
min"
]
options
:
[
"
min
ute
"
]
-
key
:
level
options
:
[
"
1"
]
relabel
:
...
...
@@ -233,7 +233,7 @@ metricsRules:
range
:
PT1M
labelFilter
:
-
key
:
dimensionality
options
:
[
"
min"
]
options
:
[
"
min
ute
"
]
-
key
:
level
options
:
[
"
2"
]
relabel
:
...
...
oap-server/server-bootstrap/src/main/resources/oc-rules/oap.yaml
浏览文件 @
a3ae7b4d
...
...
@@ -207,7 +207,7 @@ metricsRules:
range
:
PT1M
labelFilter
:
-
key
:
dimensionality
options
:
[
"
min"
]
options
:
[
"
min
ute
"
]
-
key
:
level
options
:
[
"
1"
]
relabel
:
...
...
@@ -224,7 +224,7 @@ metricsRules:
range
:
PT1M
labelFilter
:
-
key
:
dimensionality
options
:
[
"
min"
]
options
:
[
"
min
ute
"
]
-
key
:
level
options
:
[
"
2"
]
relabel
:
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsAggregateWorker.java
浏览文件 @
a3ae7b4d
...
...
@@ -69,7 +69,7 @@ public class MetricsAggregateWorker extends AbstractWorker<Metrics> {
.
getService
(
MetricsCreator
.
class
);
aggregationCounter
=
metricsCreator
.
createCounter
(
"metrics_aggregation"
,
"The number of rows in aggregation"
,
new
MetricsTag
.
Keys
(
"metricName"
,
"level"
,
"dimensionality"
),
new
MetricsTag
.
Values
(
modelName
,
"1"
,
"min"
)
new
MetricsTag
.
Keys
(
"metricName"
,
"level"
,
"dimensionality"
),
new
MetricsTag
.
Values
(
modelName
,
"1"
,
"min
ute
"
)
);
}
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsPersistentWorker.java
浏览文件 @
a3ae7b4d
...
...
@@ -41,6 +41,10 @@ import org.apache.skywalking.oap.server.core.storage.model.Model;
import
org.apache.skywalking.oap.server.core.worker.AbstractWorker
;
import
org.apache.skywalking.oap.server.library.client.request.PrepareRequest
;
import
org.apache.skywalking.oap.server.library.module.ModuleDefineHolder
;
import
org.apache.skywalking.oap.server.telemetry.TelemetryModule
;
import
org.apache.skywalking.oap.server.telemetry.api.CounterMetrics
;
import
org.apache.skywalking.oap.server.telemetry.api.MetricsCreator
;
import
org.apache.skywalking.oap.server.telemetry.api.MetricsTag
;
/**
* MetricsPersistentWorker is an extension of {@link PersistenceWorker} and focuses on the Metrics data persistent.
...
...
@@ -56,6 +60,7 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
private
final
Optional
<
MetricsTransWorker
>
transWorker
;
private
final
boolean
enableDatabaseSession
;
private
final
boolean
supportUpdate
;
private
CounterMetrics
aggregationCounter
;
MetricsPersistentWorker
(
ModuleDefineHolder
moduleDefineHolder
,
Model
model
,
IMetricsDAO
metricsDAO
,
AbstractWorker
<
Metrics
>
nextAlarmWorker
,
AbstractWorker
<
ExportEvent
>
nextExportWorker
,
...
...
@@ -84,6 +89,14 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
this
.
dataCarrier
=
new
DataCarrier
<>(
"MetricsPersistentWorker."
+
model
.
getName
(),
name
,
1
,
2000
);
this
.
dataCarrier
.
consume
(
ConsumerPoolFactory
.
INSTANCE
.
get
(
name
),
new
PersistentConsumer
());
MetricsCreator
metricsCreator
=
moduleDefineHolder
.
find
(
TelemetryModule
.
NAME
)
.
provider
()
.
getService
(
MetricsCreator
.
class
);
aggregationCounter
=
metricsCreator
.
createCounter
(
"metrics_aggregation"
,
"The number of rows in aggregation"
,
new
MetricsTag
.
Keys
(
"metricName"
,
"level"
,
"dimensionality"
),
new
MetricsTag
.
Values
(
model
.
getName
(),
"2"
,
model
.
getDownsampling
().
getName
())
);
}
/**
...
...
@@ -102,6 +115,7 @@ public class MetricsPersistentWorker extends PersistenceWorker<Metrics> {
*/
@Override
public
void
in
(
Metrics
metrics
)
{
aggregationCounter
.
inc
();
dataCarrier
.
produce
(
metrics
);
}
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsStreamProcessor.java
浏览文件 @
a3ae7b4d
...
...
@@ -146,7 +146,7 @@ public class MetricsStreamProcessor implements StreamProcessor<Metrics> {
}
transWorker
=
new
MetricsTransWorker
(
moduleDefineHolder
,
stream
.
getName
(),
hourPersistentWorker
,
dayPersistentWorker
);
moduleDefineHolder
,
hourPersistentWorker
,
dayPersistentWorker
);
}
Model
model
=
modelSetter
.
add
(
...
...
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/worker/MetricsTransWorker.java
浏览文件 @
a3ae7b4d
...
...
@@ -22,10 +22,6 @@ import java.util.Objects;
import
org.apache.skywalking.oap.server.core.analysis.metrics.Metrics
;
import
org.apache.skywalking.oap.server.core.worker.AbstractWorker
;
import
org.apache.skywalking.oap.server.library.module.ModuleDefineHolder
;
import
org.apache.skywalking.oap.server.telemetry.TelemetryModule
;
import
org.apache.skywalking.oap.server.telemetry.api.CounterMetrics
;
import
org.apache.skywalking.oap.server.telemetry.api.MetricsCreator
;
import
org.apache.skywalking.oap.server.telemetry.api.MetricsTag
;
/**
* MetricsTransWorker is transferring the metrics for downsampling. All streaming process metrics are in the minute
...
...
@@ -36,28 +32,12 @@ public class MetricsTransWorker extends AbstractWorker<Metrics> {
private
final
MetricsPersistentWorker
hourPersistenceWorker
;
private
final
MetricsPersistentWorker
dayPersistenceWorker
;
private
final
CounterMetrics
aggregationHourCounter
;
private
final
CounterMetrics
aggregationDayCounter
;
public
MetricsTransWorker
(
ModuleDefineHolder
moduleDefineHolder
,
String
modelName
,
MetricsPersistentWorker
hourPersistenceWorker
,
MetricsPersistentWorker
dayPersistenceWorker
)
{
super
(
moduleDefineHolder
);
this
.
hourPersistenceWorker
=
hourPersistenceWorker
;
this
.
dayPersistenceWorker
=
dayPersistenceWorker
;
MetricsCreator
metricsCreator
=
moduleDefineHolder
.
find
(
TelemetryModule
.
NAME
)
.
provider
()
.
getService
(
MetricsCreator
.
class
);
aggregationHourCounter
=
metricsCreator
.
createCounter
(
"metrics_aggregation"
,
"The number of rows in aggregation"
,
new
MetricsTag
.
Keys
(
"metricName"
,
"level"
,
"dimensionality"
),
new
MetricsTag
.
Values
(
modelName
,
"2"
,
"hour"
));
aggregationDayCounter
=
metricsCreator
.
createCounter
(
"metrics_aggregation"
,
"The number of rows in aggregation"
,
new
MetricsTag
.
Keys
(
"metricName"
,
"level"
,
"dimensionality"
),
new
MetricsTag
.
Values
(
modelName
,
"2"
,
"day"
));
}
/**
...
...
@@ -68,11 +48,9 @@ public class MetricsTransWorker extends AbstractWorker<Metrics> {
@Override
public
void
in
(
Metrics
metrics
)
{
if
(
Objects
.
nonNull
(
hourPersistenceWorker
))
{
aggregationHourCounter
.
inc
();
hourPersistenceWorker
.
in
(
metrics
.
toHour
());
}
if
(
Objects
.
nonNull
(
dayPersistenceWorker
))
{
aggregationDayCounter
.
inc
();
dayPersistenceWorker
.
in
(
metrics
.
toDay
());
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录