diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-09-06 08:57:14 +0200 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2023-09-06 13:08:19 +0200 |
commit | 71322adbc15045c62537b2c590d0b24758634ecf (patch) | |
tree | f6266bfcc509eeb9568a4804965ce0ce95bcf498 | |
parent | 677e8a800233d9dbca68f0ef947d4a5038ae402a (diff) |
Add Micrometer [history]montreal
- add Micrometer dependency
- add build.gradle on the project root level since the Jenkins gradle plugin is failing otherwise
Issue-ID: PORTALNG-59
Change-Id: I7342b7be38ab6620f5d216006e34b7b60333d740
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
-rw-r--r-- | app/build.gradle | 6 | ||||
-rw-r--r-- | app/src/main/resources/application.yml | 7 | ||||
-rw-r--r-- | build.gradle | 6 |
3 files changed, 19 insertions, 0 deletions
diff --git a/app/build.gradle b/app/build.gradle index 227f384..54f80b2 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,6 +25,7 @@ ext { embedMongoVersion = '4.7.0' embedMongoIntegrationVersion = '4.7.0' springCloudWiremockVersion = '4.0.3' + micrometerVersion = '1.0.0' } dependencies { @@ -42,6 +43,11 @@ dependencies { implementation "ch.qos.logback:logback-core:$logbackVersion" implementation "net.logstash.logback:logstash-logback-encoder:$logstashLogbackVersion" + implementation(platform("io.micrometer:micrometer-tracing-bom:$micrometerVersion")) + implementation("io.micrometer:micrometer-tracing") + implementation("io.micrometer:micrometer-tracing-bridge-otel") + implementation("io.opentelemetry:opentelemetry-exporter-zipkin") + compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' diff --git a/app/src/main/resources/application.yml b/app/src/main/resources/application.yml index 13c8716..8d3ccde 100644 --- a/app/src/main/resources/application.yml +++ b/app/src/main/resources/application.yml @@ -40,3 +40,10 @@ management: enabled: true java: enabled: true + tracing: + enabled: true + sampling: + probability: 1.0 # sample every request + zipkin: + tracing: + endpoint: http://${COLLECTOR_HOST}:${COLLECTOR_PORT}/api/v2/spans
\ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..170acca --- /dev/null +++ b/build.gradle @@ -0,0 +1,6 @@ +// this build.gradle is mainly here to satisfy the Jenkins gradle plugin +allprojects { + repositories { + mavenCentral() + } +}
\ No newline at end of file |