From 89d0f7407f4b446193cfe6252ddb9f770d5dc4e9 Mon Sep 17 00:00:00 2001 From: Toshiaki Maki Date: Wed, 10 Jul 2024 10:45:27 +0900 Subject: [PATCH] Add spring version info in resource_attributes --- src/main/resources/application.properties | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 5c7ae87..930cd8b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -29,8 +29,10 @@ management.observations.enable.spring.security=false management.opentelemetry.instrumentation.logback-appender.capture-experimental-attributes=true management.opentelemetry.instrumentation.logback-appender.capture-key-value-pair-attributes=true management.opentelemetry.resource-attributes.git.commit.id.abbrev=${git.commit.id.abbrev:N/A} -management.opentelemetry.resource-attributes.git.commit.message.short"=${git.commit.message.short:N/A} +management.opentelemetry.resource-attributes.git.commit.message.short=${git.commit.message.short:N/A} management.opentelemetry.resource-attributes.hostname=${HOSTNAME:N/A} +management.opentelemetry.resource-attributes.spring.boot.version=${build.spring.boot.version:N/A} +management.opentelemetry.resource-attributes.spring.framework.version=${build.spring.framework.version:N/A} management.otlp.logging.compression=gzip management.otlp.tracing.compression=gzip management.tracing.sampling.probability=1.0 @@ -42,7 +44,7 @@ server.shutdown=graceful server.tomcat.mbeanregistry.enabled=true server.tomcat.threads.min-spare=4 spring.application.name=blog-api -spring.config.import=optional:classpath:git.properties +spring.config.import=optional:classpath:git.properties,optional:classpath:META-INF/build-info.properties spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.hikari.connection-timeout=2000 spring.datasource.hikari.data-source-properties.cancelSignalTimeout=2