diff --git a/ocr-service-v1/ocr-service-processor/build.gradle.kts b/ocr-service-v1/ocr-service-processor/build.gradle.kts index e43c464..60351ba 100644 --- a/ocr-service-v1/ocr-service-processor/build.gradle.kts +++ b/ocr-service-v1/ocr-service-processor/build.gradle.kts @@ -14,7 +14,7 @@ dependencies { api("net.sourceforge.tess4j:tess4j:5.8.0") api("com.iqser.red.commons:metric-commons:2.1.0") api("com.iqser.red.commons:storage-commons:2.45.0") - api("com.knecon.fforesight:tenant-commons:0.13.0") + api("com.knecon.fforesight:tenant-commons:0.14.0") api("com.pdftron:PDFNet:10.5.0") api("org.apache.pdfbox:pdfbox:3.0.0") api("org.apache.pdfbox:jbig2-imageio:3.0.4") diff --git a/ocr-service-v1/ocr-service-server/build.gradle.kts b/ocr-service-v1/ocr-service-server/build.gradle.kts index e5db81b..7eb71a3 100644 --- a/ocr-service-v1/ocr-service-server/build.gradle.kts +++ b/ocr-service-v1/ocr-service-server/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.3" + id("org.springframework.boot") version "3.1.5" id("io.spring.dependency-management") version "1.1.3" id("org.sonarqube") version "4.3.0.3225" id("io.freefair.lombok") version "8.2.2" @@ -11,19 +11,26 @@ plugins { 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") } } +val springBootStarterVersion = "3.1.5" dependencies { implementation(project(":ocr-service-processor")) implementation(project(":ocr-service-api")) + implementation("com.knecon.fforesight:tracing:0.5.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}") - testImplementation("org.springframework.boot:spring-boot-starter-test:3.1.4") + implementation("net.logstash.logback:logstash-logback-encoder:7.4") + implementation("ch.qos.logback:logback-classic") + + testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootStarterVersion}") testImplementation("com.iqser.red.commons:test-commons:2.1.0") testImplementation("org.springframework.amqp:spring-rabbit-test:3.0.2") } diff --git a/ocr-service-v1/ocr-service-server/src/main/resources/application.yml b/ocr-service-v1/ocr-service-server/src/main/resources/application.yml index be46f05..6d421a2 100644 --- a/ocr-service-v1/ocr-service-server/src/main/resources/application.yml +++ b/ocr-service-v1/ocr-service-server/src/main/resources/application.yml @@ -5,10 +5,18 @@ persistence-service.url: "http://persistence-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: ocr-service main: allow-circular-references: true # FIXME profiles: @@ -41,9 +49,12 @@ management: health.enabled: true endpoints.web.exposure.include: prometheus, health, metrics metrics.export.prometheus.enabled: ${monitoring.enabled:false} - - -storage: - backend: 's3' + 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} pdftron.license: ${PDFTRON_LICENSE} diff --git a/ocr-service-v1/ocr-service-server/src/main/resources/log4j2.xml b/ocr-service-v1/ocr-service-server/src/main/resources/log4j2.xml deleted file mode 100644 index c36f74e..0000000 --- a/ocr-service-v1/ocr-service-server/src/main/resources/log4j2.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - ${env:LOGGING_TYPE} - - - - - - - - - - - - - - - - - - diff --git a/ocr-service-v1/ocr-service-server/src/main/resources/logback-spring.xml b/ocr-service-v1/ocr-service-server/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..33b2cef --- /dev/null +++ b/ocr-service-v1/ocr-service-server/src/main/resources/logback-spring.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file