-
-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathMauiProgram.cs
More file actions
34 lines (30 loc) · 1.01 KB
/
MauiProgram.cs
File metadata and controls
34 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using Microsoft.Extensions.Logging;
using Sentry.Maui;
namespace Sentry.Maui.Device.IntegrationTestApp;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.UseSentry(options =>
{
options.Dsn = System.Environment.GetEnvironmentVariable("SENTRY_DSN") ?? "http://key@127.0.0.1:8000/0";
options.Debug = false;
options.DiagnosticLevel = SentryLevel.Error;
// predictable crash envelopes only
options.SendClientReports = false;
options.AutoSessionTracking = false;
})
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
#if DEBUG
builder.Logging.AddDebug();
#endif
return builder.Build();
}
}