---
title: "Migrating Version 4.3 to 5.0"
description: "Learn about migrating from version 4.3.0 to 5.0.0"
url: https://docs.sentry.io/platforms/java/guides/logback/migration/4.3-to-5.0/
---

# Migrating Version 4.3 to 5.0 | Sentry for Logback

## [Migrating from `io.sentry:sentry` `4.3.0` to `io.sentry:sentry` `5.0.0`](https://docs.sentry.io/platforms/java/guides/logback/migration/4.3-to-5.0/#migrating-from-iosentrysentry-430-to-iosentrysentry-500)

`Sentry#startTransaction` by default does not bind created transaction to the scope. To start transaction with binding to the scope, use one of the new overloaded `startTransaction` methods taking `bindToScope` parameter and set it to `true`. Bound transaction can be retrieved with `Sentry#getSpan`.

All SDK methods have been annotated with [JetBrains Annotations](https://github.com/JetBrains/java-annotations): `@Nullable` and `@NotNull`. Kotlin compiler respects these annotations and as a result, in Kotlin code, some fields that were recognized as not-null, are now nullable, and the other way around.

`SentryBaseEvent#getOriginThrowable` has been deprecated in favor of `SentryBaseEvent#getThrowable`, and `SentryBaseEvent#getThrowable` now returns the unwrapped throwable.

The `ShutdownHookIntegration` now flushes the SDK instead of closing it.

`SentryOptions#getCacheDirSize` has been deprecated in favor of `SentryOptions#getMaxCacheItems`.

`InvalidDsnException` has been removed. It is replaced by `IllegalArgumentException`.

`EventProcessor` interface has a new `default` method which could break the instantiation when using trailing lambdas.

*Old*:

```kotlin
SentryOptions#addEventProcessor { event, _ -> event }
```

*New*:

```kotlin
SentryOptions#addEventProcessor(object : EventProcessor {
    override fun process(event: SentryEvent, hint: Hint): SentryEvent? {
        return event
    }
})
```

### [Spring Boot](https://docs.sentry.io/platforms/java/guides/logback/migration/4.3-to-5.0/#spring-boot)

The property `sentry.enable-tracing` is deprecated. To enable tracing simply set `sentry.traces-sample-rate` or create a bean implementing `TracesSamplerCallback`.
