diff --git a/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/trace/SpanHandler.java b/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/trace/SpanHandler.java index 67e25d1e3..7478686a1 100644 --- a/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/trace/SpanHandler.java +++ b/server/apm/apm-server/apm-receiver/src/main/java/io/holoinsight/server/apm/receiver/trace/SpanHandler.java @@ -180,7 +180,9 @@ public void buildRelation(List relationBuilders) throws relationBuilders.forEach(callingIn -> { ServiceRelation serviceRelation = callingIn.toServiceRelation(); - serverRelationList.add(ServiceRelationDO.fromServiceRelation(serviceRelation)); + if (serviceRelation != null) { + serverRelationList.add(ServiceRelationDO.fromServiceRelation(serviceRelation)); + } ServiceInstanceRelation serviceInstanceRelation = callingIn.toServiceInstanceRelation(); if (serviceInstanceRelation != null) {