From 71b5b8fa9e57cfaa81cae59483eb19fb011cfbf6 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Fri, 14 Feb 2025 10:11:40 +0100 Subject: [PATCH] Add tracing for uui-server - define tracing dependencies - use test scope for wiremock dependency - align application.properties file with the version in the OOM chart [0] [0] this includes removing ssl related properties and files since they are not used anymore Issue-ID: USECASEUI-872 Change-Id: I6089dd4573940b8313b8ff421b5f89291422c5c1 Signed-off-by: Fiete Ostkamp --- server/pom.xml | 11 +++++++++- server/src/main/resources/application.properties | 25 +++++++++++------------ server/src/main/resources/keystore/README.txt | 12 ----------- server/src/main/resources/keystore/uuiServer.jks | Bin 2231 -> 0 bytes 4 files changed, 22 insertions(+), 26 deletions(-) delete mode 100644 server/src/main/resources/keystore/README.txt delete mode 100644 server/src/main/resources/keystore/uuiServer.jks diff --git a/server/pom.xml b/server/pom.xml index 5be2e75c..3ff2bdd7 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -71,6 +71,7 @@ org.wiremock.integrations wiremock-spring-boot 3.0.3 + test org.springframework.boot @@ -204,7 +205,14 @@ org.apache.httpcomponents httpclient - + + io.micrometer + micrometer-tracing-bridge-otel + + + io.opentelemetry + opentelemetry-exporter-zipkin + org.mockito mockito-inline @@ -351,6 +359,7 @@ 17 17 + true diff --git a/server/src/main/resources/application.properties b/server/src/main/resources/application.properties index 61671eca..03840869 100644 --- a/server/src/main/resources/application.properties +++ b/server/src/main/resources/application.properties @@ -14,18 +14,17 @@ ## limitations under the License. ## ## General App Properties +spring.application.name=uui-server server.servlet.contextPath=/api/usecaseui-server/v1 server.port=8082 -spring.http.multipart.max-file-size=512MB -spring.servlet.multipart.max-file-size=512MB -spring.http.multipart.max-request-size=512MB -spring.servlet.multipart.max-request-size=512MB +spring.http.multipart.max-file-size=128MB +spring.http.multipart.max-request-size=128MB ## App DB Properties spring.datasource.url=jdbc:postgresql://${POSTGRES_IP:127.0.0.1}:${POSTGRES_PORT:5432}/${POSTGRES_DB_NAME:uui} -spring.datasource.username=${POSTGRES_USERNAME:uui} -spring.datasource.password=${POSTGRES_PASSWORD:uui} -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect +spring.datasource.username=${POSTGRES_USERNAME} +spring.datasource.password=${POSTGRES_PASSWORD} +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL9Dialect spring.database.driver.classname=org.postgresql.Driver spring.jpa.show-sql=false spring.jpa.properties.hibernate.format_sql=false @@ -43,19 +42,19 @@ spring.jpa.properties.hibernate.cache.use_query_cache=false ## Logback Properties logging.file.name=logs/usecaseui_server.log -logging.level.*=ERROR +logging.level.*=INFO #enable shutdown endpoints.shutdown.enabled=true endpoints.shutdown.sensitive=false -server.ssl.protocol=TLS -server.ssl.key-store=classpath:keystore/uuiServer.jks -server.ssl.key-store-password=Aa123456 -server.ssl.key-store-type=JKS - intents.scheduledTask.enabled=false +management.endpoints.web.exposure.include=* +management.tracing.enabled=${TRACING_ENABLED:false} +management.tracing.sampling.probability=1.0 +management.zipkin.tracing.endpoint=http://${COLLECTOR_HOST:jaeger-collector.istio-system}:${COLLECTOR_PORT:9411}/api/v2/spans + uui-server.client.aai.baseUrl=http://aai.onap uui-server.client.aai.username=AAI uui-server.client.aai.password=AAI diff --git a/server/src/main/resources/keystore/README.txt b/server/src/main/resources/keystore/README.txt deleted file mode 100644 index 226e7297..00000000 --- a/server/src/main/resources/keystore/README.txt +++ /dev/null @@ -1,12 +0,0 @@ -keytool -genkeypair -keystore uuiServer.jks -alias uuiServer -keypass Aa123456 -storepass Aa123456 -keyalg RSA -keysize 2048 -validity 365 -dname "C=US; O=ONAP; OU=OSAAF; CN=intermediateCA_9" - - -3650 – 10 years validity -Development – Organization unit -ChinaMobile – Organization -Beijing- City -cn – Country code - - -uuiServer.jks – name of keystore -Aa123456 - password diff --git a/server/src/main/resources/keystore/uuiServer.jks b/server/src/main/resources/keystore/uuiServer.jks deleted file mode 100644 index 70d3196a899f5e7a40e4042cdf795eb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