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.
This commit is contained in:
parent
c8b89e5379
commit
b2e8438820
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue