aboutsummaryrefslogtreecommitdiffstats
path: root/aai-resources
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-10-19 14:03:59 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2023-10-19 15:19:18 +0200
commit6c6d7d0f9ba9fbaa677cd7e9a9c4a19244a61c19 (patch)
tree8a44f082afcede03db2ff03da71ca9356990c922 /aai-resources
parentbe4c967659e73814dc14d9c144b8ad4156af4aca (diff)
Add spring-cloud-sleuth for tracing
- add tracing dependency - configure both b3 and w3c trace propagation formats to have interoperability between spring-boot 2 (sleuth) and spring-boot 3 (micrometer) tracing Issue-ID: AAI-3668 Change-Id: I429247444715186be562d009f0d6a6f6ede7e1c3 Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'aai-resources')
-rw-r--r--aai-resources/.classpath63
-rw-r--r--aai-resources/.gitignore2
-rw-r--r--aai-resources/pom.xml19
-rw-r--r--aai-resources/src/main/resources/application.properties8
4 files changed, 26 insertions, 66 deletions
diff --git a/aai-resources/.classpath b/aai-resources/.classpath
deleted file mode 100644
index fadd195..0000000
--- a/aai-resources/.classpath
+++ /dev/null
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="test" value="true"/>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/docker">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/swm">
- <attributes>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/classes" path="src/main/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="maven.pomderived" value="true"/>
- <attribute name="test" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" path="target/generated-sources/annotations">
- <attributes>
- <attribute name="optional" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="target/generated-test-sources/test-annotations">
- <attributes>
- <attribute name="optional" value="true"/>
- <attribute name="test" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
diff --git a/aai-resources/.gitignore b/aai-resources/.gitignore
index a8f03c5..47d0f72 100644
--- a/aai-resources/.gitignore
+++ b/aai-resources/.gitignore
@@ -14,3 +14,5 @@ bundleconfig-local/etc/logback.xml
*.iml
**/dbedgerules/**
**/oxm/**
+**/.classpath
+.classpath \ No newline at end of file
diff --git a/aai-resources/pom.xml b/aai-resources/pom.xml
index 4336d67..c7a32ab 100644
--- a/aai-resources/pom.xml
+++ b/aai-resources/pom.xml
@@ -98,8 +98,8 @@
<!-- Integration tests will be skipped by default. Could be enabled here or by -DskipITs=false-->
<skipITs>true</skipITs>
- <!-- https://mvnrepository.com/artifact/io.swagger/swagger-core -->
<swagger.version>1.6.8</swagger.version>
+ <spring-cloud.version>2020.0.2</spring-cloud.version>
</properties>
<profiles>
<!-- Docker profile to be used for building docker image and pushing to nexus -->
@@ -311,6 +311,14 @@
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-starter-sleuth</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-sleuth-zipkin</artifactId>
+ </dependency>
+ <dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-spring-legacy</artifactId>
<version>${micrometer-spring-legacy.version}</version>
@@ -712,6 +720,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+ <dependency>
+ <groupId>org.springframework.cloud</groupId>
+ <artifactId>spring-cloud-dependencies</artifactId>
+ <version>${spring-cloud.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
<build>
@@ -983,7 +998,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <configuration combine.children="append">
+ <configuration>
<excludes>
<exclude>**/*WebSecurityConfig.*</exclude>
</excludes>
diff --git a/aai-resources/src/main/resources/application.properties b/aai-resources/src/main/resources/application.properties
index 66a8e53..adf899a 100644
--- a/aai-resources/src/main/resources/application.properties
+++ b/aai-resources/src/main/resources/application.properties
@@ -4,9 +4,15 @@ info.build.name=resources
info.build.description=Resources Microservice
info.build.version=1.1.0
-spring.application.name=Resources Microservice
+spring.application.name=aai-resources
spring.jersey.type=filter
spring.main.allow-bean-definition-overriding=true
+spring.zipkin.baseUrl=http://jaeger-collector.istio-system:9411
+spring.sleuth.messaging.jms.enabled = false
+spring.sleuth.trace-id128=true
+spring.sleuth.sampler.probability=1.0
+spring.sleuth.propagation.type=w3c, b3
+spring.sleuth.supports-join=false
server.servlet.context-path=/
spring.autoconfigure.exclude=\