Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
kezhenxu94 committed Sep 9, 2024
1 parent 4c8390a commit 9461e2f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class SampleFamily {
static SampleFamily build(RunningContext ctx, Sample... samples) {
Preconditions.checkNotNull(samples);
Preconditions.checkArgument(samples.length > 0);
log.info("Samples size: {}", samples.length);
samples = Arrays.stream(samples).filter(sample -> !Double.isNaN(sample.getValue())).toArray(Sample[]::new);
if (samples.length == 0) {
return EMPTY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void export(ExportLogsServiceRequest request, StreamObserver<ExportLogsSe
doAnalysisQuietly(service, layer, serviceInstance, logRecord);
}
});
responseObserver.onNext(ExportLogsServiceResponse.getDefaultInstance());
responseObserver.onNext(ExportLogsServiceResponse.newBuilder().build());
responseObserver.onCompleted();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void export(
final ExportMetricsServiceRequest requests,
final StreamObserver<ExportMetricsServiceResponse> responseObserver) {
metricRequestProcessor.processMetricsRequest(requests);
responseObserver.onNext(ExportMetricsServiceResponse.getDefaultInstance());
responseObserver.onNext(ExportMetricsServiceResponse.newBuilder().build());
responseObserver.onCompleted();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void export(ExportTraceServiceRequest request, StreamObserver<ExportTrace
getForwardService().send(result);
}

responseObserver.onNext(ExportTraceServiceResponse.getDefaultInstance());
responseObserver.onNext(ExportTraceServiceResponse.newBuilder().build());
responseObserver.onCompleted();
}

Expand Down

0 comments on commit 9461e2f

Please sign in to comment.