未验证 提交 b2e84388 编写于 作者: 静夜思朝颜's avatar 静夜思朝颜 提交者: GitHub

Change `SO11Y` metric `envoy_als_in_count` to calculate the ALS message count. (#8150)

* Change `SO11Y` metric `envoy_als_in_count` to calculate the ALS message count.
上级 c8b89e53
......@@ -49,6 +49,7 @@ Release Notes.
* Fix `max` function in OAL doesn't support negative long.
* Add `MicroBench` module to make it easier for developers to write JMH test.
* Upgrade Kubernetes Java client to 14.0.0, supports GCP token refreshing and fixes some bugs.
* Change `SO11Y` metric `envoy_als_in_count` to calculate the ALS message count.
#### UI
......
......@@ -80,7 +80,7 @@ public class AccessLogServiceGRPCHandler extends AccessLogServiceGrpc.AccessLogS
MetricsCreator metricCreator = manager.find(TelemetryModule.NAME).provider().getService(MetricsCreator.class);
counter = metricCreator.createCounter(
"envoy_als_in_count", "The count of envoy ALS metric received", MetricsTag.EMPTY_KEY,
"envoy_als_in_count", "The count of envoy ALS message received", MetricsTag.EMPTY_KEY,
MetricsTag.EMPTY_VALUE
);
histogram = metricCreator.createHistogramMetric(
......@@ -103,8 +103,6 @@ public class AccessLogServiceGRPCHandler extends AccessLogServiceGrpc.AccessLogS
@Override
public void onNext(StreamAccessLogsMessage message) {
counter.inc();
HistogramMetrics.Timer timer = histogram.createTimer();
try {
if (isFirst) {
......@@ -129,6 +127,7 @@ public class AccessLogServiceGRPCHandler extends AccessLogServiceGrpc.AccessLogS
switch (logCase) {
case HTTP_LOGS:
StreamAccessLogsMessage.HTTPAccessLogEntries logs = message.getHttpLogs();
counter.inc(logs.getLogEntryCount());
for (final HTTPAccessLogEntry log : logs.getLogEntryList()) {
AccessLogAnalyzer.Result result = AccessLogAnalyzer.Result.builder().build();
......@@ -143,6 +142,7 @@ public class AccessLogServiceGRPCHandler extends AccessLogServiceGrpc.AccessLogS
break;
case TCP_LOGS:
StreamAccessLogsMessage.TCPAccessLogEntries tcpLogs = message.getTcpLogs();
counter.inc(tcpLogs.getLogEntryCount());
for (final TCPAccessLogEntry tcpLog : tcpLogs.getLogEntryList()) {
AccessLogAnalyzer.Result result = AccessLogAnalyzer.Result.builder().build();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册