From 71b5b8fa9e57cfaa81cae59483eb19fb011cfbf6 Mon Sep 17 00:00:00 2001 From: Fiete Ostkamp Date: Fri, 14 Feb 2025 10:11:40 +0100 Subject: 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 70d3196a..00000000 Binary files a/server/src/main/resources/keystore/uuiServer.jks and /dev/null differ -- cgit