-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram.cs
More file actions
50 lines (44 loc) · 1.65 KB
/
Copy pathProgram.cs
File metadata and controls
50 lines (44 loc) · 1.65 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System.Reflection;
using Sentry;
namespace clip2load
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// Initialize Sentry SDK for logging and analytics
SentrySdk.Init(o =>
{
o.Dsn = "https://566cd2389f8b8dbaebea75cf6ef12b25@o1113761.ingest.us.sentry.io/4510319876505600";
o.Debug = true;
o.TracesSampleRate = 1.0;
o.IsGlobalModeEnabled = true;
o.Release = Properties.Resources.Version;
o.Environment = "production";
o.AutoSessionTracking = true;
o.SetBeforeSend((sentryEvent, hint) =>
{
// Add custom context to all events
sentryEvent.SetTag("os", Environment.OSVersion.ToString());
return sentryEvent;
});
o.AttachStacktrace = true;
o.SendDefaultPii = false;
});
// Add global exception handler
Application.ThreadException += (sender, e) =>
{
SentrySdk.CaptureException(e.Exception);
};
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize();
Application.Run(new clip2load());
}
}
}