mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[TUI] Integrate Sentry for error tracking and performance monitoring
This commit is contained in:
@@ -35,6 +35,31 @@ public static class Program
|
||||
{
|
||||
public static int Main(string[] args)
|
||||
{
|
||||
SentrySdk.Init(options =>
|
||||
{
|
||||
// A Sentry Data Source Name (DSN) is required.
|
||||
// See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
|
||||
// You can set it in the SENTRY_DSN environment variable, or you can set it in code here.
|
||||
options.Dsn = "https://153a04fb97b78bb57a8013b8b30db04f@sentry.claunia.com/8";
|
||||
|
||||
// When debug is enabled, the Sentry client will emit detailed debugging information to the console.
|
||||
// This might be helpful, or might interfere with the normal operation of your application.
|
||||
// We enable it here for demonstration purposes when first trying Sentry.
|
||||
// You shouldn't do this in your applications unless you're troubleshooting issues with Sentry.
|
||||
//options.Debug = true;
|
||||
|
||||
// This option is recommended. It enables Sentry's "Release Health" feature.
|
||||
options.AutoSessionTracking = true;
|
||||
|
||||
// Set TracesSampleRate to 1.0 to capture 100%
|
||||
// of transactions for tracing.
|
||||
// We recommend adjusting this value in production.
|
||||
options.TracesSampleRate = 1.0;
|
||||
|
||||
options.IsGlobalModeEnabled = true;
|
||||
});
|
||||
|
||||
SentrySdk.ConfigureScope(scope => scope.SetExtra("Args", Environment.GetCommandLineArgs()));
|
||||
// There are too many places that depend on this being inited to be sure all are covered, so init it here.
|
||||
PluginBase.Init();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user