From 4e5eddd23546b3dba47115970360efed32900fa5 Mon Sep 17 00:00:00 2001 From: tkuzynow Date: Wed, 24 Jul 2024 12:56:31 +0200 Subject: [PATCH] feat: enable micrometer tracing --- pom.xml | 9 +++++++++ src/main/resources/application.properties | 9 ++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 66f90f58..3a7bd073 100644 --- a/pom.xml +++ b/pom.xml @@ -108,6 +108,15 @@ spring-boot-starter-actuator + + io.micrometer + micrometer-tracing-bridge-otel + + + io.opentelemetry + opentelemetry-exporter-zipkin + + org.openapitools diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 34876a21..dd92004a 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.). app.base.url=https:// +spring.application.name=agency-service # Currently active profile spring.profiles.active=@activeSpringProfile@ spring.main.allow-bean-definition-overriding=true @@ -88,4 +89,10 @@ management.health.probes.enabled=true spring.security.oauth2.resourceserver.jwt.issuer-uri: https://localhost/auth/realms/onlineberatung spring.security.oauth2.resourceserver.jwt.jwk-set-uri: https://localhost/auth/realms/onlineberatung/protocol/openid-connect/certs spring.jwt.auth.converter.resource-id: app -spring.jwt.auth.converter.principal-attribute: preferred_username \ No newline at end of file +spring.jwt.auth.converter.principal-attribute: preferred_username + + +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