Add tracing for uui-server 22/140222/1 15.0.2
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 14 Feb 2025 09:11:40 +0000 (10:11 +0100)
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>
Fri, 14 Feb 2025 09:11:40 +0000 (10:11 +0100)
- 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 <Fiete.Ostkamp@telekom.de>
server/pom.xml
server/src/main/resources/application.properties
server/src/main/resources/keystore/README.txt [deleted file]
server/src/main/resources/keystore/uuiServer.jks [deleted file]

index 5be2e75..3ff2bdd 100644 (file)
@@ -71,6 +71,7 @@
             <groupId>org.wiremock.integrations</groupId>
             <artifactId>wiremock-spring-boot</artifactId>
             <version>3.0.3</version>
+            <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.apache.httpcomponents</groupId>
             <artifactId>httpclient</artifactId>
         </dependency>
-
+        <dependency>
+            <groupId>io.micrometer</groupId>
+            <artifactId>micrometer-tracing-bridge-otel</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.opentelemetry</groupId>
+            <artifactId>opentelemetry-exporter-zipkin</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
             <artifactId>mockito-inline</artifactId>
                 <configuration>
                     <source>17</source>
                     <target>17</target>
+                    <parameters>true</parameters>
                 </configuration>
             </plugin>
             <plugin>
index 61671ec..0384086 100644 (file)
 ## 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 (file)
index 226e729..0000000
+++ /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 (file)
index 70d3196..0000000
Binary files a/server/src/main/resources/keystore/uuiServer.jks and /dev/null differ