From 25a5a81163afcb61dd6256865b9c3d61a5242c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=A7=80=EC=9B=90?= Date: Mon, 28 Oct 2024 18:25:56 +0900 Subject: [PATCH] chore : delete unnecessary logging --- .../tracedin/api/metric/grpc/ServiceMetricsGrpc.java | 8 +------- .../java/com/univ/tracedin/api/span/grpc/SpanGrpc.java | 1 - .../com/univ/tracedin/infra/kafka/KafkaProducerImpl.java | 9 --------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/metric/grpc/ServiceMetricsGrpc.java b/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/metric/grpc/ServiceMetricsGrpc.java index 2788b4c..815bf0c 100644 --- a/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/metric/grpc/ServiceMetricsGrpc.java +++ b/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/metric/grpc/ServiceMetricsGrpc.java @@ -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; @@ -34,7 +32,6 @@ public void appendServiceMetrics( AppendServiceMetricsRequest request, StreamObserver responseObserver) { try { - log.info("appendServiceMetrics request: {}", request.toString()); serviceMetricsService.appendMetrics(toServiceMetrics(request)); responseObserver.onNext( AppendServiceMetricsResponse.newBuilder().setStatusCode(200).build()); @@ -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(); } diff --git a/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/span/grpc/SpanGrpc.java b/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/span/grpc/SpanGrpc.java index cae0e59..06cf068 100644 --- a/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/span/grpc/SpanGrpc.java +++ b/tracedin-application/app-api/src/main/java/com/univ/tracedin/api/span/grpc/SpanGrpc.java @@ -36,7 +36,6 @@ public class SpanGrpc extends SpanGrpcAppenderImplBase { public void appendSpans( AppendSpansRequest request, StreamObserver 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) { diff --git a/tracedin-infra/src/main/java/com/univ/tracedin/infra/kafka/KafkaProducerImpl.java b/tracedin-infra/src/main/java/com/univ/tracedin/infra/kafka/KafkaProducerImpl.java index 89ed5a0..4fa8b03 100644 --- a/tracedin-infra/src/main/java/com/univ/tracedin/infra/kafka/KafkaProducerImpl.java +++ b/tracedin-infra/src/main/java/com/univ/tracedin/infra/kafka/KafkaProducerImpl.java @@ -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); } });