Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions smoke-tests/images/spring-boot/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,22 @@ plugins {
id("otel.java-conventions")

id("com.google.cloud.tools.jib")
id("org.springframework.boot") version "2.6.15"
id("org.springframework.boot") version "3.5.4"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently newer plugin along with older spring dependencies produces a working application

}

dependencies {
implementation(platform("io.opentelemetry:opentelemetry-bom:1.0.0"))
implementation(platform("io.opentelemetry:opentelemetry-bom"))
implementation(platform("org.springframework.boot:spring-boot-dependencies:2.6.15"))

implementation("io.opentelemetry:opentelemetry-api")
implementation(project(":instrumentation-annotations"))
implementation("org.springframework.boot:spring-boot-starter-web")
}

otelJava {
minJavaVersionSupported = JavaVersion.VERSION_17
}

configurations.runtimeClasspath {
resolutionStrategy {
// requires old logback (and therefore also old slf4j)
Expand All @@ -25,18 +29,11 @@ configurations.runtimeClasspath {
}
}

val targetJDK = project.findProperty("targetJDK") ?: "11"
val targetJDK = project.findProperty("targetJDK") ?: "17"

val tag = findProperty("tag")
?: DateTimeFormatter.ofPattern("yyyyMMdd.HHmmSS").format(LocalDateTime.now())

java {
// needed by jib to detect java version used in project
// for jdk9+ jib uses an entrypoint that doesn't work with jdk8
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

springBoot {
buildInfo {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ spring.application.name=otel-spring-test-app

logging.level.root=WARN
logging.level.io.opentelemetry=INFO
logging.pattern.console=%-5level [%t] %C{1.}: %msg trace_id=%X{trace_id}%n
logging.pattern.console=%-5level [%t] %C: %msg trace_id=%X{trace_id}%n
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pattern failed to parse when spring dependencies were also updated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean that updating the plugin is forcing the spring dependency updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, I just tried what happens if I also update the spring boot version in the app and got an exception. We could consider updating the spring dependencies too, as far as I understand there isn't anything that would prevent us from running the test with spring boot 3 instead of 2.