From 6c433f0443629fe808bf146e113bbd2d2193af2b Mon Sep 17 00:00:00 2001 From: tkuzynow Date: Fri, 26 Jul 2024 16:33:22 +0200 Subject: [PATCH] feat: enable distributed tracing --- pom.xml | 8 ++++++++ src/main/resources/application.properties | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/pom.xml b/pom.xml index be0e719..c764830 100644 --- a/pom.xml +++ b/pom.xml @@ -242,6 +242,14 @@ org.springframework.boot spring-boot-starter-actuator + + io.micrometer + micrometer-tracing-bridge-otel + + + io.opentelemetry + opentelemetry-exporter-zipkin + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 586fa72..cfe0e68 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,7 @@ # This file contains general application properties. # All properties that are environment specific are in their related property file (like database login data, logging level, etc.). #Spring +spring.application.name=video-service spring.main.allow-bean-definition-overriding=true # Base URL of the application app.base.url=https:// @@ -81,3 +82,7 @@ spring.jwt.auth.converter.principal-attribute: preferred_username springdoc.api-docs.enabled=false logging.level.org.springframework.web.filter.CommonsRequestLoggingFilter=DEBUG +management.zipkin.tracing.endpoint: http://localhost:9411/api/v2/spans +management.tracing.enabled: true +management.tracing.sampling.probability: 1 +logging.pattern.level=%5p [${spring.application.name:},%X{traceId:-},%X{spanId:-}] \ No newline at end of file