Skip to content

Commit

Permalink
chore : delete unnecessary logging
Browse files Browse the repository at this point in the history
  • Loading branch information
JiwonKKang committed Oct 28, 2024
1 parent 0c45b99 commit 25a5a81
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.univ.tracedin.api.metric.grpc;

import static com.univ.tracedin.api.global.util.GrpcMappingUtils.convertValue;

import java.time.LocalDateTime;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -34,7 +32,6 @@ public void appendServiceMetrics(
AppendServiceMetricsRequest request,
StreamObserver<AppendServiceMetricsResponse> responseObserver) {
try {
log.info("appendServiceMetrics request: {}", request.toString());
serviceMetricsService.appendMetrics(toServiceMetrics(request));
responseObserver.onNext(
AppendServiceMetricsResponse.newBuilder().setStatusCode(200).build());
Expand Down Expand Up @@ -68,10 +65,7 @@ private Metric toMetric(MetricRequest metricRequest) {
.max(metricRequest.getMax())
.attributes(
metricRequest.getAttributesMap().entrySet().stream()
.collect(
Collectors.toMap(
Map.Entry::getKey,
entry -> convertValue(entry.getValue()))))
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)))
.timestamp(LocalDateTime.now())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public class SpanGrpc extends SpanGrpcAppenderImplBase {
public void appendSpans(
AppendSpansRequest request, StreamObserver<AppendSpanResponse> responseObserver) {
try {
log.info("appendSpans request: {}", request.toString());
spanService.appendSpans(request.getSpansList().stream().map(this::toSpan).toList());
responseObserver.onNext(AppendSpanResponse.newBuilder().setStatusCode(200).build());
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,8 @@ public void send(
kafkaResultFuture.whenComplete(
(result, ex) -> {
if (ex != null) {
log.error(
"Error while sending message to kafka with key: {}, message: {} and exception: {}",
key,
message,
ex.getMessage());
callback.completeExceptionally(ex);
} else {
log.info(
"Message sent successfully to kafka with key: {}, message: {}",
key,
message);
callback.complete(result);
}
});
Expand Down

0 comments on commit 25a5a81

Please sign in to comment.