---
title: "Releases & Health"
description: "Configure releases and session tracking to monitor release health in Kotlin Multiplatform apps."
url: https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases/
---

# Releases & Health | Sentry for Kotlin Multiplatform

A release is a version of your code that is deployed to an [environment](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/environments.md). When you give Sentry information about your releases, you can:

* Determine issues and regressions introduced in a new release
* Predict which commit caused an issue and who is likely responsible
* Resolve issues by including the issue number in your commit message
* Receive email notifications when your code gets deployed

## [Bind the Version](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases.md#bind-the-version)

Include a release ID (often called a "version") when you initialize the SDK.

There are some release name restrictions and conventions to be aware of. [Learn more about naming releases](https://docs.sentry.io/product/releases/naming-releases.md).

Releases can also be auto-created by different systems—for example, when uploading a source map, or by some clients when an event that is tagged with a release is ingested. Therefore, it's important to set the release name when building and deploying your application. Learn more in our [Releases](https://docs.sentry.io/platform-redirect.md?next=/configuration/releases/) documentation.

## [Setting a Release](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases.md#setting-a-release)

```kotlin
import io.sentry.kotlin.multiplatform.Sentry

Sentry.init { options ->
  options.release = "io.example@1.1.0"
}
```

If no release name is set, the SDK creates a default, depending on the native platform.

How you make the release name (or version) available to your code is up to you. For example, you could use an environment variable that is set during the build process or during initial start-up.

Setting the release name tags each event with that release name. We recommend that you tell Sentry about a new release before sending events with that release name, as this will unlock a few more features. Learn more in our [Releases](https://docs.sentry.io/product/releases.md) documentation.

If you don't tell Sentry about a new release, Sentry will automatically create a release entity in the system the first time it sees an event with that release ID.

After configuring your SDK, you can install a repository integration or manually supply Sentry with your own commit metadata. Read our documentation about [setting up releases](https://docs.sentry.io/product/releases/setup.md) for further information about integrations, associating commits, and telling Sentry when deploying releases.

## [Release Health](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases.md#release-health)

[Release Health](https://docs.sentry.io/product/releases/health.md) uses session data to show crash-free sessions and users for each release. A session represents a user's interaction with your app and records whether that interaction ended in a crash.

### [Automatic Session Tracking](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases.md#automatic-session-tracking)

Automatic session tracking is enabled by default for Android and supported Apple app lifecycles. The native SDK handles foreground and background transitions. By default, a background interval longer than 30 seconds ends the session; returning to the app starts a new one.

Configure session tracking in your shared initializer:

```kotlin
import io.sentry.kotlin.multiplatform.Sentry

fun initializeSentry() {
    Sentry.init { options ->
        options.dsn = "https://<key>@o<orgId>.ingest.sentry.io/<projectId>"
        options.enableAutoSessionTracking = true
        options.sessionTrackingIntervalMillis = 60000
    }
}
```

This example changes the background timeout to 60 seconds. The default for `sessionTrackingIntervalMillis` is `30000` milliseconds. To disable automatic session tracking, set `enableAutoSessionTracking` to `false`.

Sessions are associated with a release. Use the release configured in [Setting a Release](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases.md#setting-a-release) to compare crash-free sessions and users between app versions.

### [Platform Details](https://docs.sentry.io/platforms/kotlin/guides/kotlin-multiplatform/configuration/releases.md#platform-details)

Follow the native guides for lifecycle requirements and platform-specific behavior:

* [Android session tracking](https://docs.sentry.io/platforms/android/configuration/releases.md#sessions), including the AndroidX lifecycle dependencies used for automatic tracking.
* [Apple session tracking](https://docs.sentry.io/platforms/apple/configuration/releases.md#sessions).
* [JVM session tracking](https://docs.sentry.io/platforms/java/configuration/releases.md#sessions), which requires explicit session management through the native Java SDK. Setting the shared automatic-tracking option does not provide a JVM application lifecycle integration.
