diff --git a/ObjectHashServer.API/ObjectHashServer.API.csproj b/ObjectHashServer.API/ObjectHashServer.API.csproj index 3cde665..435d488 100644 --- a/ObjectHashServer.API/ObjectHashServer.API.csproj +++ b/ObjectHashServer.API/ObjectHashServer.API.csproj @@ -6,6 +6,9 @@ enable enable + + + @@ -15,6 +18,7 @@ + diff --git a/ObjectHashServer.API/Program.cs b/ObjectHashServer.API/Program.cs index 3ab008e..1676787 100644 --- a/ObjectHashServer.API/Program.cs +++ b/ObjectHashServer.API/Program.cs @@ -5,6 +5,7 @@ using Microsoft.Extensions.Hosting; using Newtonsoft.Json.Serialization; using Newtonsoft.Json; +using Sentry; var host = new HostBuilder() .ConfigureFunctionsWebApplication() @@ -26,4 +27,21 @@ }) .Build(); +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://a15d97557f84d25bfbb417eef0bec23f@o4508133068963840.ingest.de.sentry.io/4508439116513360"; + + // 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; +}); + host.Run(); \ No newline at end of file