forked from newrelic/newrelic-opentelemetry-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
27 lines (24 loc) · 1.07 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
plugins {
id 'java-library'
id 'org.springframework.boot' version '2.5.12'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
}
bootRun {
mainClass.set 'com.newrelic.app.Application'
}
// Spring boot uses logback by default. To use Log4j2, must exclude spring-boot-starter-logging from all
// dependencies, and instead include spring-boot-starter-log4j2
configurations.all {
exclude module: 'spring-boot-starter-logging'
}
// Force upgrade log4j2 to avoid vulnerability: https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot
ext['log4j2.version'] = '2.17.1'
// Force upgrade to appease snyk
ext['spring-framework.version'] = '5.3.19'
dependencies {
implementation project(':shared-utils')
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
implementation 'org.apache.logging.log4j:log4j-layout-template-json:2.14.1'
implementation "io.opentelemetry.instrumentation:opentelemetry-logback-mdc-1.0:${project['otel-instrumentation.version']}"
}