diff --git a/redaction-service-v1/redaction-service-server-v1/build.gradle.kts b/redaction-service-v1/redaction-service-server-v1/build.gradle.kts index 45a389ec..4f28efa2 100644 --- a/redaction-service-v1/redaction-service-server-v1/build.gradle.kts +++ b/redaction-service-v1/redaction-service-server-v1/build.gradle.kts @@ -3,7 +3,7 @@ import org.springframework.boot.gradle.tasks.bundling.BootBuildImage plugins { application id("com.iqser.red.service.java-conventions") - id("org.springframework.boot") version "3.1.4" + id("org.springframework.boot") version "3.1.5" id("io.spring.dependency-management") version "1.1.3" id("org.sonarqube") version "4.4.1.3373" id("io.freefair.lombok") version "8.4" @@ -17,10 +17,13 @@ val jacksonVersion = "2.15.2" val droolsVersion = "9.44.0.Final" val pdfBoxVersion = "3.0.0" val persistenceServiceVersion = "2.242.0" +val springBootStarterVersion = "3.1.5" configurations { all { - exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging") + exclude(group = "commons-logging", module = "commons-logging") + exclude(group = "org.springframework.boot", module = "spring-boot-starter-log4j2") + exclude(group = "com.iqser.red.commons", module = "logging-commons") } } @@ -36,6 +39,7 @@ dependencies { implementation("com.iqser.red.commons:dictionary-merge-commons:1.5.0") implementation("com.iqser.red.commons:storage-commons:2.45.0") implementation("com.knecon.fforesight:tenant-commons:0.14.0") + implementation("com.knecon.fforesight:tracing:0.5.0") implementation("com.fasterxml.jackson.module:jackson-module-afterburner:${jacksonVersion}") implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:${jacksonVersion}") @@ -49,13 +53,16 @@ dependencies { implementation("org.locationtech.jts:jts-core:1.19.0") implementation("org.springframework.cloud:spring-cloud-starter-openfeign:4.0.4") - implementation("org.springframework.boot:spring-boot-starter-amqp:3.1.4") + implementation("org.springframework.boot:spring-boot-starter-amqp:${springBootStarterVersion}") + + implementation("net.logstash.logback:logstash-logback-encoder:7.4") + implementation("ch.qos.logback:logback-classic") testImplementation(project(":rules-management")) testImplementation("org.apache.pdfbox:pdfbox:${pdfBoxVersion}") testImplementation("org.apache.pdfbox:pdfbox-tools:${pdfBoxVersion}") - testImplementation("org.springframework.boot:spring-boot-starter-test:3.1.4") + testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootStarterVersion}") testImplementation("com.knecon.fforesight:layoutparser-service-processor:${layoutParserVersion}") { exclude( group = "com.iqser.red.service", diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/resources/application.yml b/redaction-service-v1/redaction-service-server-v1/src/main/resources/application.yml index f2359f9d..f5343bde 100644 --- a/redaction-service-v1/redaction-service-server-v1/src/main/resources/application.yml +++ b/redaction-service-v1/redaction-service-server-v1/src/main/resources/application.yml @@ -7,10 +7,18 @@ entity-recognition-service.url: "http://entity-recognition-service-v1:8080" tenant-user-management-service.url: "http://tenant-user-management-service:8080/internal" fforesight.tenants.remote: true +logging.pattern.level: "%5p [${spring.application.name},%X{traceId:-},%X{spanId:-}]" + +logging.type: ${LOGGING_TYPE:CONSOLE} +kubernetes.namespace: ${NAMESPACE:default} +project.version: 1.0-SNAPSHOT + server: port: 8080 spring: + application: + name: redaction-service main: allow-circular-references: true # FIXME profiles: @@ -37,6 +45,13 @@ management: health.enabled: true endpoints.web.exposure.include: prometheus, health metrics.export.prometheus.enabled: ${monitoring.enabled:false} + tracing: + enabled: ${TRACING_ENABLED:false} + sampling: + probability: ${TRACING_PROBABILITY:1.0} + otlp: + tracing: + endpoint: ${OTLP_ENDPOINT:http://otel-collector-opentelemetry-collector.otel-collector:4318/v1/traces} storage: diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/resources/log4j2.xml b/redaction-service-v1/redaction-service-server-v1/src/main/resources/log4j2.xml deleted file mode 100644 index c36f74e8..00000000 --- a/redaction-service-v1/redaction-service-server-v1/src/main/resources/log4j2.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - ${env:LOGGING_TYPE} - - - - - - - - - - - - - - - - - - diff --git a/redaction-service-v1/redaction-service-server-v1/src/main/resources/logback-spring.xml b/redaction-service-v1/redaction-service-server-v1/src/main/resources/logback-spring.xml new file mode 100644 index 00000000..33b2cef7 --- /dev/null +++ b/redaction-service-v1/redaction-service-server-v1/src/main/resources/logback-spring.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file