getsentry / getsentry/sentry-dotnet

Release Health Sessions not sent from ios devices.

Open
#3,848 2 comments 0 reactions 0 assignees View on GitHub
.NET Improvement iOS
Dominant language
C#
Stars
770
Forks
248
Avg merge
3d 4h
Merged PRs (30d)
49

Description

### Package

Sentry

### .NET Flavor

.NET

### .NET Version

8.0.6

### OS

iOS

### SDK Version

4.4.0

### Self-Hosted Sentry Version

_No response_

### Steps to Reproduce

Configure the DotNet SDK as follows:
```
SentrySdk.Init(options =>
{
options.Dsn = dsn; //dsn for a specific project
options.AutoSessionTrackingInterval = new TimeSpan(0, 0, 30);
var flavor = //get build flavor
options.Environment = flavor switch {
BuildFlavorEnum.DEV => "Development",
BuildFlavorEnum.QA => "Quality",
BuildFlavorEnum.STAGE => "Stage",
BuildFlavorEnum.PROD => "Production",
_ => "Unknown"
};
options.Release =
options.InitCacheFlushTimeout=new TimeSpan(0,0,0);
options.SetBeforeSend((sentryEvent, sentryHint) => {
scope.User = new SentryUser() {
//Set user id
};
// if there is a need to attach a file then attach a file to an event. In some situation.
{
var filePath = GetFileToAttach();
sentryHint.AddAttachment(filePath);
}
return sentryEvent;
});
}); // end of init.
```

Deploy the app on Android and ios devices.
Run the app.

### Expected Result

Release health sessions are sent for both Android and ios devices.

### Actual Result

Release health Sessions are not sent from ios devices. The project also did not get any events from Native ios code (`sentry.native.dotnet` or `sentry.cocoa.dotnet`).

The DotNet layer does not send sessions health because `options.AutoSessionTracking` is not set to true in the SDK initialisation. If the underlying Android SDK is able to send this information, we expect the Cocoa SDK to also be able to send it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.