From 0d724a182435f03145ca26b9eb9eb11fb3d531e9 Mon Sep 17 00:00:00 2001 From: Raja Kolli Date: Sun, 10 Sep 2023 13:49:34 +0000 Subject: [PATCH] #325 - fix issue with tracing of catalog-service --- catalog-service/pom.xml | 6 ---- .../config/ObservabilityConfiguration.java | 6 ++-- .../src/main/resources/application.properties | 2 -- .../src/main/resources/logback-spring.xml | 31 ++++--------------- .../config-repository/catalog-service.yml | 3 -- 5 files changed, 9 insertions(+), 39 deletions(-) diff --git a/catalog-service/pom.xml b/catalog-service/pom.xml index d6642fe2..5d31bd45 100644 --- a/catalog-service/pom.xml +++ b/catalog-service/pom.xml @@ -102,12 +102,6 @@ resilience4j-micrometer runtime - - com.github.loki4j - loki-logback-appender - runtime - 1.4.1 - net.ttddyy.observation datasource-micrometer-spring-boot diff --git a/catalog-service/src/main/java/com/example/catalogservice/config/ObservabilityConfiguration.java b/catalog-service/src/main/java/com/example/catalogservice/config/ObservabilityConfiguration.java index 2eec2131..96f92ef5 100644 --- a/catalog-service/src/main/java/com/example/catalogservice/config/ObservabilityConfiguration.java +++ b/catalog-service/src/main/java/com/example/catalogservice/config/ObservabilityConfiguration.java @@ -1,6 +1,6 @@ /***

- Licensed under MIT License Copyright (c) 2021-2023 Raja Kolli. + Licensed under MIT License Copyright (c) 2022-2023 Raja Kolli.

***/ @@ -28,8 +28,8 @@ ObservedAspect observedAspect(ObservationRegistry observationRegistry) { } @Bean - WebClient webClient() { - return WebClient.builder() + WebClient webClient(WebClient.Builder webClientBuilder) { + return webClientBuilder .defaultHeader(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON_VALUE) .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .baseUrl(applicationProperties.getInventoryServiceUrl()) diff --git a/catalog-service/src/main/resources/application.properties b/catalog-service/src/main/resources/application.properties index 50fe748b..622c6088 100644 --- a/catalog-service/src/main/resources/application.properties +++ b/catalog-service/src/main/resources/application.properties @@ -3,8 +3,6 @@ server.port=18080 spring.webflux.base-path=/${spring.application.name} -spring.config.import=optional:configserver:${CONFIG_SERVER:http://localhost:8888}/ - # spring.kafka.bootstrap-servers=localhost:9092 spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializer spring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializer diff --git a/catalog-service/src/main/resources/logback-spring.xml b/catalog-service/src/main/resources/logback-spring.xml index c5269b8c..a8f1a904 100644 --- a/catalog-service/src/main/resources/logback-spring.xml +++ b/catalog-service/src/main/resources/logback-spring.xml @@ -4,20 +4,15 @@ - - - - - - - - + + + @@ -25,23 +20,9 @@ - - 2000 - - ${lokiUri:-http://localhost:3100/loki/api/v1/push} - - - - - ${FILE_LOG_PATTERN} - - true - - true - - + + + diff --git a/config-server/src/main/resources/config-repository/catalog-service.yml b/config-server/src/main/resources/config-repository/catalog-service.yml index 13920651..e705fead 100644 --- a/config-server/src/main/resources/config-repository/catalog-service.yml +++ b/config-server/src/main/resources/config-repository/catalog-service.yml @@ -1,6 +1,3 @@ -logging: - file: - name: logs/catalog-service.log resilience4j: bulkhead: instances: