Only count 5xx as error in Envoy ALS receiver (#7111)

This commit is contained in:
Zhenxu 2021-06-12 07:09:48 +08:00 committed by GitHub
parent 7a3355f956
commit efcb396f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Release Notes.
#### OAP-Backend
* Disable Spring sleuth meter analyzer by default.
* Use MAL to calculate JVM metrics, remove OAL dependency.
* Only count 5xx as error in Envoy ALS receiver.
#### UI

View File

@ -96,7 +96,7 @@ public class LogEntry2MetricsAdapter {
final String endpoint = endpoint();
int responseCode = entry.getResponse().getResponseCode().getValue();
responseCode = responseCode > 0 ? responseCode : 200;
final boolean status = responseCode >= 200 && responseCode < 400;
final boolean status = responseCode < 500;
final Protocol protocol = requestProtocol(entry.getRequest());
final String tlsMode = parseTLS(properties.getTlsProperties());
final String internalErrorCode = parseInternalErrorCode(properties.getResponseFlags());