Filter endpoint with an id == 0 (#4105)

This commit is contained in:
Gao Hongtao 2019-12-23 11:57:58 +08:00 committed by GitHub
parent 4f80c5b750
commit 4ed21e1c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -238,6 +238,10 @@ public class TelemetryDataDispatcher {
}
private static void toEndpoint(ServiceMeshMetricDataDecorator decorator, long minuteTimeBucket) {
if (decorator.getEndpointId() == Const.NONE) {
logger.warn("Received service mesh data {} with an id == 0", decorator);
return;
}
ServiceMeshMetric metrics = decorator.getMetric();
Endpoint endpoint = new Endpoint();
endpoint.setTimeBucket(minuteTimeBucket);