From 41e0a36325545fabac25da81ecd277cd1ead6759 Mon Sep 17 00:00:00 2001 From: tkuzynow <tomasz.kuzynowski@gmail.com> Date: Wed, 24 Jul 2024 16:44:04 +0200 Subject: [PATCH] feat: enable distributed tracing --- pom.xml | 17 +++++++++++++++++ src/main/resources/application.properties | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 372cb80..e744c59 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,18 @@ <spring-security-test.version>5.5.7</spring-security-test.version> </properties> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-dependencies</artifactId> + <version>2022.0.5</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> <!-- Spring Boot dependencies --> <dependency> @@ -95,6 +107,11 @@ <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-starter-sleuth</artifactId> + <version>3.1.11</version> + </dependency> <!-- OpenApi/Swagger dependencies --> <dependency> diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7d28b66..97aad91 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -100,4 +100,8 @@ feature.multitenancy.with.single.domain.enabled=false management.endpoint.health.enabled=true management.endpoint.health.show-details=never management.endpoints.web.exposure.include=health -management.health.probes.enabled=true \ No newline at end of file +spring.application.name=message-service +management.health.probes.enabled=true + +spring.zipkin.baseUrl: https://localhost:9411/ +logging.pattern.level=%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}] \ No newline at end of file