# Releases & Health | Sentry for log4net

A release is a version of your code that is deployed to an [environment](https://docs.sentry.io/platforms/dotnet/guides/log4net/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/dotnet/guides/log4net/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/dotnet/guides/log4net/configuration/releases.md#setting-a-release)

```csharp
// Add this to the SDK initialization callback
options.Release = "my-project-name@2.3.12";
```

The SDK attempts to locate the release to attach to events sent to Sentry.

The SDK will first check if there's a version set on the environment via `SENTRY_RELEASE` and use it as-is.

If no version is found, the SDK will look at the [entry assembly's](https://msdn.microsoft.com/en-us/library/system.reflection.assembly.getentryassembly\(v=vs.110\).aspx) `AssemblyInformationalVersionAttribute`, which accepts a string value and is often used to set a GIT commit hash. If that returns null, then the SDK will look at the default `AssemblyVersionAttribute`, which accepts the numeric version number. The resulting release will be in the format `<assembly-name>@<version-number>`.

An `AssemblyInformationalVersionAttribute` is included automatically in SDK-style projects with a default value of `"1.0.0.0"`. You can set the `Version` property in your project file to override this value or [disable it entirely](https://learn.microsoft.com/en-us/dotnet/standard/assembly/set-attributes-project-file#use-package-properties-as-assembly-attributes) by setting the `GenerateAssemblyInformationalVersionAttribute` property to `false`.

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/dotnet/guides/log4net/configuration/releases.md#release-health)

Monitor the [health of releases](https://docs.sentry.io/product/releases/health.md) by observing user adoption, usage of the application, percentage of [crashes](https://docs.sentry.io/product/releases/health.md#crashes), and [session data](https://docs.sentry.io/product/releases/health.md#sessions). Release health will provide insight into the impact of crashes and bugs as it relates to user experience, and reveal trends with each new issue through the [Release Details](https://docs.sentry.io/product/releases/release-details.md) graphs and filters.

In order to monitor release health, the SDK sends session data.

### [Sessions](https://docs.sentry.io/platforms/dotnet/guides/log4net/configuration/releases.md#sessions)

A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release. Most Sentry SDKs can manage sessions automatically.

We mark the session as:

* Healthy
* Abnormal
* Errored: if the SDK captures an event that contains an exception (this includes manually captured errors).
* Crashed

To enable sending sessions, set the `AutoSessionTracking` flag to `true`. When enabled, the .NET SDK is creating a session on application startup and ending it on shut down.

```csharp
// Add this to the SDK initialization callback
options.AutoSessionTracking = true; // default: false
```

Release health support for .NET is currently limited to single-instance **client** applications only. This means it can be used with WPF, Xamarin, WinForms and similar app models. Support for server frameworks such as ASP.NET is planned.
