Skip to content
Open
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .github/workflows/spring-boot-4-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
springboot-version: [ '4.0.0', '4.0.5' ]
springboot-version: [ '4.0.0', '4.0.5', '4.1.0' ]

name: Spring Boot ${{ matrix.springboot-version }}
env:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

### Dependencies

- Bump Spring Boot 4 and OpenTelemetry dependencies ([#5573](https://github.com/getsentry/sentry-java/pull/5573))
- Bump Native SDK from v0.15.0 to v0.15.1 ([#5570](https://github.com/getsentry/sentry-java/pull/5570))
- [changelog](https://github.com/getsentry/sentry-native/blob/master/CHANGELOG.md#0151)
- [diff](https://github.com/getsentry/sentry-native/compare/0.15.0...0.15.1)
Expand Down
20 changes: 8 additions & 12 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ feign = "11.6"
gummyBears = "0.12.0"
jackson = "2.18.3"
jetbrainsCompose = "1.6.11"
kotlin = "2.2.0"
kotlinSpring7 = "2.2.0"
kotlin = "2.3.21"
kotlin-compatible-version = "1.9"
ksp = "2.3.9"
ktorClient = "3.0.0"
Expand All @@ -25,23 +24,23 @@ nopen = "1.0.1"
# see https://developer.android.com/jetpack/androidx/releases/compose-kotlin
okhttp = "4.9.2"
openfeature = "1.18.2"
otel = "1.60.1"
otelInstrumentation = "2.26.0"
otelInstrumentationAlpha = "2.26.0-alpha"
otel = "1.63.0"
otelInstrumentation = "2.29.0"
otelInstrumentationAlpha = "2.29.0-alpha"
# check https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/dependencyManagement/build.gradle.kts#L49 for release version above to find a compatible version
otelSemanticConventions = "1.40.0"
otelSemanticConventionsAlpha = "1.40.0-alpha"
otelSemanticConventions = "1.42.0"
otelSemanticConventionsAlpha = "1.42.0-alpha"
retrofit = "2.9.0"
room2 = "2.8.4"
room3 = "3.0.0-alpha06"
sagp = "6.10.0"
sqlite = "2.6.2"
sqliteAlpha = "2.7.0-alpha06" # Required by Room3 3.0.0-alpha*
slf4j = "1.7.30"
spotless = "8.4.0"
spotless = "8.8.0"
springboot2 = "2.7.18"
springboot3 = "3.5.0"
springboot4 = "4.0.0"
springboot4 = "4.1.0"
sqldelight = "2.3.2"

# Android
Expand All @@ -52,8 +51,6 @@ minSdk = "21"
[plugins]
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-spring = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlin" }
kotlin-spring7 = { id = "org.jetbrains.kotlin.plugin.spring", version.ref = "kotlinSpring7" }
kotlin-jvm-spring7 = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlinSpring7" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Expand Down Expand Up @@ -130,7 +127,6 @@ jackson-kotlin = { module = "com.fasterxml.jackson.module:jackson-module-kotlin"
jetbrains-annotations = { module = "org.jetbrains:annotations", version = "23.0.0" }
kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
kotlin-test-junit-spring7 = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlinSpring7" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktorClient" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `Standalone app start transaction op is app start`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)

setAppStartTime()
Expand All @@ -257,8 +256,9 @@ class ActivityLifecycleIntegrationTest {
verify(fixture.scopes, times(2)).startTransaction(any(), any<TransactionOptions>())

val contexts = fixture.capturedContexts
val appStartContext =
contexts.single { it.operation == ActivityLifecycleIntegration.STANDALONE_APP_START_OP }
val appStartContext = contexts.single {
it.operation == ActivityLifecycleIntegration.STANDALONE_APP_START_OP
}
assertEquals("App Start", appStartContext.name)
assertEquals(TransactionNameSource.COMPONENT, appStartContext.transactionNameSource)
val appStartTransaction =
Expand All @@ -278,11 +278,10 @@ class ActivityLifecycleIntegrationTest {
@Test
@Config(sdk = [Build.VERSION_CODES.VANILLA_ICE_CREAM])
fun `Standalone app start transaction carries app start reason when available`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)

setAppStartTime()
Expand All @@ -304,11 +303,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `Standalone app start transaction has no app start reason when unavailable`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)

setAppStartTime()
Expand All @@ -326,11 +324,10 @@ class ActivityLifecycleIntegrationTest {
@Test
@Config(sdk = [Build.VERSION_CODES.VANILLA_ICE_CREAM])
fun `Headless standalone app start transaction carries app start reason when available`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
prepareHeadlessAppStart(appStartType = AppStartType.COLD)
val startInfo =
Expand All @@ -347,11 +344,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `HeadlessAppStartListener is registered when standalone flag is on and performance enabled`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
prepareHeadlessAppStart(appStartType = AppStartType.UNKNOWN)

Expand Down Expand Up @@ -389,11 +385,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `close clears HeadlessAppStartListener`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
sut.close()
prepareHeadlessAppStart()
Expand All @@ -405,11 +400,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `onHeadlessAppStart creates standalone App Start transaction and stashes trace id`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
prepareHeadlessAppStart(appStartType = AppStartType.COLD)

Expand All @@ -436,11 +430,10 @@ class ActivityLifecycleIntegrationTest {
@Test
@Config(sdk = [Build.VERSION_CODES.M])
fun `onHeadlessAppStart creates standalone App Start transaction on API 23`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
prepareHeadlessSdkInitAppStart()

Expand All @@ -463,11 +456,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `onHeadlessAppStart creates standalone App Start transaction when appStartType is WARM`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
prepareHeadlessAppStart(appStartType = AppStartType.WARM)

Expand All @@ -482,11 +474,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `onHeadlessAppStart does nothing when appStartTimeSpan is incomplete`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
AppStartMetrics.getInstance().appStartTimeSpan.reset()
AppStartMetrics.getInstance().sdkInitTimeSpan.reset()
Expand Down Expand Up @@ -801,11 +792,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `When Activity is destroyed, sets standalone appStartTransaction status to cancelled and finish it`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)

setAppStartTime()
Expand Down Expand Up @@ -1177,11 +1167,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `launcher activity emits ui load and standalone App Start sharing trace id`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
val firstFrameDate = SentryNanotimeDate(1499, 0)
fixture.options.dateProvider = SentryDateProvider { firstFrameDate }
Expand Down Expand Up @@ -1232,11 +1221,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `launcher activity attaches lifecycle spans before finishing stopped standalone App Start`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
val appStartEndDate = SentryNanotimeDate(499, 0)
setAppStartTime(SentryNanotimeDate(1, 0), appStartEndDate)
Expand Down Expand Up @@ -1265,11 +1253,10 @@ class ActivityLifecycleIntegrationTest {
@Test
fun `activity following a headless start reuses trace id and does not emit second standalone`() {
val storedTraceId = SentryId()
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
AppStartMetrics.getInstance().setAppStartTraceId(storedTraceId)
// headless start always stores the trace header alongside the trace id; the ui.load txn
// continues that trace via continueTrace, sharing the trace id.
Expand All @@ -1291,11 +1278,10 @@ class ActivityLifecycleIntegrationTest {
@Test
fun `activity within a minute of the headless start continues the same trace`() {
val storedTraceId = SentryId()
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
AppStartMetrics.getInstance().setAppStartTraceId(storedTraceId)
AppStartMetrics.getInstance().appStartSentryTraceHeader =
SentryTraceHeader(storedTraceId, SpanId(), true).value
Expand All @@ -1315,11 +1301,10 @@ class ActivityLifecycleIntegrationTest {
@Test
fun `activity more than a minute after the headless start starts a fresh trace`() {
val storedTraceId = SentryId()
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
AppStartMetrics.getInstance().setAppStartTraceId(storedTraceId)
AppStartMetrics.getInstance().appStartSentryTraceHeader =
SentryTraceHeader(storedTraceId, SpanId(), true).value
Expand All @@ -1341,11 +1326,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `onHeadlessAppStart stores sentry-trace and baggage headers for continuation`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
prepareHeadlessAppStart(appStartType = AppStartType.COLD)

Expand All @@ -1363,11 +1347,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `launcher activity shares standalone App Start trace and sampleRand as a sibling`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)
setAppStartTime()
// the app-start sampling decision carries the sampleRand the whole trace should share
Expand Down Expand Up @@ -1396,11 +1379,10 @@ class ActivityLifecycleIntegrationTest {

@Test
fun `activity following a headless start shares stored trace and sampleRand as a sibling and clears headers`() {
val sut =
fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
val sut = fixture.getSut {
it.tracesSampleRate = 1.0
it.isEnableStandaloneAppStartTracing = true
}
sut.register(fixture.scopes, fixture.options)

// 1) a headless start emits the standalone app.start and stores its trace headers
Expand Down
Loading
Loading