diff --git a/Directory.Build.props b/Directory.Build.props
index 64f30e7e2d..f8998eb3d4 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -27,27 +27,6 @@
true
-
-
- sentry-sdks
- sentry-dotnet
-
-
-
-
- true
- true
-
-
-
-
- <_Parameter1>https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537
-
-
-
false
diff --git a/samples/Sentry.Samples.Android/MainActivity.cs b/samples/Sentry.Samples.Android/MainActivity.cs
index 91f20ae071..a362b886aa 100644
--- a/samples/Sentry.Samples.Android/MainActivity.cs
+++ b/samples/Sentry.Samples.Android/MainActivity.cs
@@ -7,19 +7,19 @@ public class MainActivity : Activity
{
protected override void OnCreate(Bundle? savedInstanceState)
{
- SentrySdk.Init(o =>
+ SentrySdk.Init(options =>
{
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
- o.SendDefaultPii = true; // adds the user's IP address automatically
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ options.SendDefaultPii = true; // adds the user's IP address automatically
// Android specific .NET features are under the Android properties:
- o.Android.LogCatIntegration = LogCatIntegrationType.Errors; // Get logcat logs for both handled and unhandled errors; default is unhandled only
- o.Android.LogCatMaxLines = 1000; // Defaults to 1000
+ options.Android.LogCatIntegration = LogCatIntegrationType.Errors; // Get logcat logs for both handled and unhandled errors; default is unhandled only
+ options.Android.LogCatMaxLines = 1000; // Defaults to 1000
// All the native Android SDK options are available below
// https://docs.sentry.io/platforms/android/configuration/
// Enable Native Android SDK ANR detection
- o.Native.AnrEnabled = true;
+ options.Native.AnrEnabled = true;
});
// Here's an example of adding custom scope information.
diff --git a/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj b/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj
index ff57a2e864..ace5748bae 100644
--- a/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj
+++ b/samples/Sentry.Samples.Android/Sentry.Samples.Android.csproj
@@ -27,6 +27,8 @@
In a real app, you probably only want to do this on Release builds.
-->
+ sentry-sdks
+ sentry-dotnet
true
true
diff --git a/samples/Sentry.Samples.AspNetCore.Basic/Program.cs b/samples/Sentry.Samples.AspNetCore.Basic/Program.cs
index 0f995844f1..a5757beb4f 100644
--- a/samples/Sentry.Samples.AspNetCore.Basic/Program.cs
+++ b/samples/Sentry.Samples.AspNetCore.Basic/Program.cs
@@ -1,16 +1,16 @@
var builder = WebApplication.CreateBuilder(args);
-builder.WebHost.UseSentry(o =>
+builder.WebHost.UseSentry(options =>
{
// A DSN is required. You can set it here, or in configuration, or in an environment variable.
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
// Enable Sentry performance monitoring
- o.TracesSampleRate = 1.0;
+ options.TracesSampleRate = 1.0;
#if DEBUG
// Log debug information about the Sentry SDK
- o.Debug = true;
+ options.Debug = true;
#endif
});
diff --git a/samples/Sentry.Samples.AspNetCore.Basic/Sentry.Samples.AspNetCore.Basic.csproj b/samples/Sentry.Samples.AspNetCore.Basic/Sentry.Samples.AspNetCore.Basic.csproj
index 0c2de1aa2b..eb93b9fefb 100644
--- a/samples/Sentry.Samples.AspNetCore.Basic/Sentry.Samples.AspNetCore.Basic.csproj
+++ b/samples/Sentry.Samples.AspNetCore.Basic/Sentry.Samples.AspNetCore.Basic.csproj
@@ -4,6 +4,15 @@
net8.0
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Server/Sentry.Samples.AspNetCore.Blazor.Server.csproj b/samples/Sentry.Samples.AspNetCore.Blazor.Server/Sentry.Samples.AspNetCore.Blazor.Server.csproj
index d7faf4b8a5..9a87e3b353 100644
--- a/samples/Sentry.Samples.AspNetCore.Blazor.Server/Sentry.Samples.AspNetCore.Blazor.Server.csproj
+++ b/samples/Sentry.Samples.AspNetCore.Blazor.Server/Sentry.Samples.AspNetCore.Blazor.Server.csproj
@@ -5,6 +5,16 @@
enable
enable
+
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj
index 6ed388c231..b9365ff13c 100644
--- a/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj
+++ b/samples/Sentry.Samples.AspNetCore.Blazor.Wasm/Sentry.Samples.AspNetCore.Blazor.Wasm.csproj
@@ -5,6 +5,15 @@
true
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.AspNetCore.Grpc/Sentry.Samples.AspNetCore.Grpc.csproj b/samples/Sentry.Samples.AspNetCore.Grpc/Sentry.Samples.AspNetCore.Grpc.csproj
index 22e4aedb9b..b29b76dafe 100644
--- a/samples/Sentry.Samples.AspNetCore.Grpc/Sentry.Samples.AspNetCore.Grpc.csproj
+++ b/samples/Sentry.Samples.AspNetCore.Grpc/Sentry.Samples.AspNetCore.Grpc.csproj
@@ -11,10 +11,6 @@
-
-
-
-
@@ -25,4 +21,15 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
+
+
+
+
diff --git a/samples/Sentry.Samples.AspNetCore.Mvc/Sentry.Samples.AspNetCore.Mvc.csproj b/samples/Sentry.Samples.AspNetCore.Mvc/Sentry.Samples.AspNetCore.Mvc.csproj
index 864cec7178..b2b958bf3c 100644
--- a/samples/Sentry.Samples.AspNetCore.Mvc/Sentry.Samples.AspNetCore.Mvc.csproj
+++ b/samples/Sentry.Samples.AspNetCore.Mvc/Sentry.Samples.AspNetCore.Mvc.csproj
@@ -7,6 +7,13 @@
Samples.AspNetCore.Mvc
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.AspNetCore.Mvc/appsettings.json b/samples/Sentry.Samples.AspNetCore.Mvc/appsettings.json
index 26c6538838..43799f65ea 100644
--- a/samples/Sentry.Samples.AspNetCore.Mvc/appsettings.json
+++ b/samples/Sentry.Samples.AspNetCore.Mvc/appsettings.json
@@ -3,7 +3,7 @@
// All Sentry settings can also be configured via code or environment variables:
"Sentry": {
// The DSN can also be set via environment variable
- "Dsn": "https://b887218a80114d26a9b1a51c5f88e0b4@o447951.ingest.sentry.io/6601807",
+ "Dsn": "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537",
// Opt-in for payload submission
"MaxRequestBodySize": "Always",
// Sends Cookies, User Id when one is logged on and user IP address to sentry. It's turned off by default.
diff --git a/samples/Sentry.Samples.AspNetCore.Serilog/Sentry.Samples.AspNetCore.Serilog.csproj b/samples/Sentry.Samples.AspNetCore.Serilog/Sentry.Samples.AspNetCore.Serilog.csproj
index b70feb536d..ea1adeff77 100644
--- a/samples/Sentry.Samples.AspNetCore.Serilog/Sentry.Samples.AspNetCore.Serilog.csproj
+++ b/samples/Sentry.Samples.AspNetCore.Serilog/Sentry.Samples.AspNetCore.Serilog.csproj
@@ -10,6 +10,13 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.Aws.Lambda.AspNetCoreServer/Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj b/samples/Sentry.Samples.Aws.Lambda.AspNetCoreServer/Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj
index 790270997e..57b9d04312 100644
--- a/samples/Sentry.Samples.Aws.Lambda.AspNetCoreServer/Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj
+++ b/samples/Sentry.Samples.Aws.Lambda.AspNetCoreServer/Sentry.Samples.Aws.Lambda.AspNetCoreServer.csproj
@@ -4,13 +4,23 @@
true
Lambda
+
+
+
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.Azure.Functions.Worker/Program.cs b/samples/Sentry.Samples.Azure.Functions.Worker/Program.cs
index b08a44886c..5398d09a6e 100644
--- a/samples/Sentry.Samples.Azure.Functions.Worker/Program.cs
+++ b/samples/Sentry.Samples.Azure.Functions.Worker/Program.cs
@@ -6,8 +6,9 @@
{
builder.UseSentry(host, options =>
{
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
options.TracesSampleRate = 1.0;
- // options.Debug = true;
+ options.Debug = true;
});
})
.Build();
diff --git a/samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj b/samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj
index e4f3d2cc3c..7a13a8be1a 100644
--- a/samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj
+++ b/samples/Sentry.Samples.Azure.Functions.Worker/Sentry.Samples.Azure.Functions.Worker.csproj
@@ -21,7 +21,14 @@
-
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
+
diff --git a/samples/Sentry.Samples.Console.Basic/Program.cs b/samples/Sentry.Samples.Console.Basic/Program.cs
index 37e1b24edd..0cd25ae811 100644
--- a/samples/Sentry.Samples.Console.Basic/Program.cs
+++ b/samples/Sentry.Samples.Console.Basic/Program.cs
@@ -14,10 +14,9 @@
SentrySdk.Init(options =>
{
- // TODO: Configure a Sentry Data Source Name (DSN).
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
// 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 = "... Your DSN ...";
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
// 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.
diff --git a/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj b/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj
index f86d175453..3284651d5b 100644
--- a/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj
+++ b/samples/Sentry.Samples.Console.Basic/Sentry.Samples.Console.Basic.csproj
@@ -13,26 +13,43 @@
+ sentry-sdks
+ sentry-dotnet
- true
true
-
+ true
+
+ true
+
+
+ true
+ --local
+
+
+
+
+
@@ -41,6 +58,7 @@
+
diff --git a/samples/Sentry.Samples.Console.Customized/Program.cs b/samples/Sentry.Samples.Console.Customized/Program.cs
index 27f0a6bc9e..f85ae49da6 100644
--- a/samples/Sentry.Samples.Console.Customized/Program.cs
+++ b/samples/Sentry.Samples.Console.Customized/Program.cs
@@ -15,32 +15,31 @@ await SentrySdk.ConfigureScopeAsync(async scope =>
});
// Enable the SDK
- using (SentrySdk.Init(o =>
+ using (SentrySdk.Init(options =>
{
- // A Sentry Data Source Name (DSN) is required.
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
// 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.
- // o.Dsn = "... Your DSN ...";
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
// Send stack trace for events that were not created from an exception
// e.g: CaptureMessage, log.LogDebug, log.LogInformation ...
- o.AttachStacktrace = true;
+ options.AttachStacktrace = true;
// Sentry won't consider code from namespace LibraryX.* as part of the app code and will hide it from the stacktrace by default
// To see the lines from non `AppCode`, select `Full`. Will include non App code like System.*, Microsoft.* and LibraryX.*
- o.AddInAppExclude("LibraryX.");
+ options.AddInAppExclude("LibraryX.");
// Before excluding all prefixed 'LibraryX.', any stack trace from a type namespaced 'LibraryX.Core' will be considered InApp.
- o.AddInAppInclude("LibraryX.Core");
+ options.AddInAppInclude("LibraryX.Core");
// Send personal identifiable information like the username logged on to the computer and machine name
- o.SendDefaultPii = true;
+ options.SendDefaultPii = true;
// To enable event sampling, uncomment:
// o.SampleRate = 0.5f; // Randomly drop (don't send to Sentry) half of events
// Modifications to event before it goes out. Could replace the event altogether
- o.SetBeforeSend((@event, _) =>
+ options.SetBeforeSend((@event, _) =>
{
// Drop an event altogether:
if (@event.Tags.ContainsKey("SomeTag"))
@@ -53,7 +52,7 @@ await SentrySdk.ConfigureScopeAsync(async scope =>
);
// Allows inspecting and modifying, returning a new or simply rejecting (returning null)
- o.SetBeforeBreadcrumb((crumb, hint) =>
+ options.SetBeforeBreadcrumb((crumb, hint) =>
{
// Don't add breadcrumbs with message containing:
if (crumb.Message?.Contains("bad breadcrumb") == true)
@@ -72,34 +71,34 @@ await SentrySdk.ConfigureScopeAsync(async scope =>
});
// Ignore exception by its type:
- o.AddExceptionFilterForType();
+ options.AddExceptionFilterForType();
// Configure the background worker which sends events to sentry:
// Wait up to 5 seconds before shutdown while there are events to send.
- o.ShutdownTimeout = TimeSpan.FromSeconds(5);
+ options.ShutdownTimeout = TimeSpan.FromSeconds(5);
// Enable SDK logging with Debug level
- o.Debug = true;
+ options.Debug = true;
// To change the verbosity, use:
- // o.DiagnosticLevel = SentryLevel.Info;
+ // options.DiagnosticLevel = SentryLevel.Info;
// To use a custom logger:
- // o.DiagnosticLogger = ...
+ // options.DiagnosticLogger = ...
// Using a proxy:
- o.HttpProxy = null; //new WebProxy("https://localhost:3128");
+ options.HttpProxy = null; //new WebProxy("https://localhost:3128");
// Example customizing the HttpMessageHandlers created
- o.CreateHttpMessageHandler = () => new HttpClientHandler
+ options.CreateHttpMessageHandler = () => new HttpClientHandler
{
ServerCertificateCustomValidationCallback = (_, certificate, _, _) =>
!certificate.Archived
};
// Access to the HttpClient created to serve the SentryClint
- o.ConfigureClient = client => client.DefaultRequestHeaders.TryAddWithoutValidation("CustomHeader", new[] { "my value" });
+ options.ConfigureClient = client => client.DefaultRequestHeaders.TryAddWithoutValidation("CustomHeader", new[] { "my value" });
// Control/override how to apply the State object into the scope
- o.SentryScopeStateProcessor = new MyCustomerScopeStateProcessor();
+ options.SentryScopeStateProcessor = new MyCustomerScopeStateProcessor();
}))
{
// Ignored by its type due to the setting above
diff --git a/samples/Sentry.Samples.Console.Customized/Sentry.Samples.Console.Customized.csproj b/samples/Sentry.Samples.Console.Customized/Sentry.Samples.Console.Customized.csproj
index 27fb960ac5..1556990eed 100644
--- a/samples/Sentry.Samples.Console.Customized/Sentry.Samples.Console.Customized.csproj
+++ b/samples/Sentry.Samples.Console.Customized/Sentry.Samples.Console.Customized.csproj
@@ -5,6 +5,39 @@
net6.0
+
+
+
+ sentry-sdks
+ sentry-dotnet
+
+
+ true
+ true
+
+
+ true
+
+
+
+
+
+
diff --git a/samples/Sentry.Samples.Console.Metrics/Program.cs b/samples/Sentry.Samples.Console.Metrics/Program.cs
index 082dff6120..058e9b1f2b 100644
--- a/samples/Sentry.Samples.Console.Metrics/Program.cs
+++ b/samples/Sentry.Samples.Console.Metrics/Program.cs
@@ -19,9 +19,9 @@ private static async Task Main()
// Enable the SDK
using (SentrySdk.Init(options =>
{
- options.Dsn =
- // NOTE: ADD YOUR OWN DSN BELOW so you can see the events in your own Sentry account
- "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
+ // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
options.Debug = true;
options.StackTraceMode = StackTraceMode.Enhanced;
diff --git a/samples/Sentry.Samples.Console.Metrics/Sentry.Samples.Console.Metrics.csproj b/samples/Sentry.Samples.Console.Metrics/Sentry.Samples.Console.Metrics.csproj
index beb1ec147b..93cb6b917b 100644
--- a/samples/Sentry.Samples.Console.Metrics/Sentry.Samples.Console.Metrics.csproj
+++ b/samples/Sentry.Samples.Console.Metrics/Sentry.Samples.Console.Metrics.csproj
@@ -1,12 +1,45 @@
-
- Exe
- net8.0
-
-
-
-
-
+
+ Exe
+ net8.0
+
+
+
+
+
+ sentry-sdks
+ sentry-dotnet
+
+
+ true
+ true
+
+
+ true
+
+
+
+
+
+
+
+
+
diff --git a/samples/Sentry.Samples.Console.Native/Program.cs b/samples/Sentry.Samples.Console.Native/Program.cs
index b4245b694c..416e2e3a75 100644
--- a/samples/Sentry.Samples.Console.Native/Program.cs
+++ b/samples/Sentry.Samples.Console.Native/Program.cs
@@ -5,10 +5,9 @@
// Initialize the Sentry SDK. (It is not necessary to dispose it.)
SentrySdk.Init(options =>
{
- // A Sentry Data Source Name (DSN) is required.
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
// 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 = "... Your DSN ...";
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
// 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.
diff --git a/samples/Sentry.Samples.Console.Native/Sentry.Samples.Console.Native.csproj b/samples/Sentry.Samples.Console.Native/Sentry.Samples.Console.Native.csproj
index 843053f591..e4fd5c44cc 100644
--- a/samples/Sentry.Samples.Console.Native/Sentry.Samples.Console.Native.csproj
+++ b/samples/Sentry.Samples.Console.Native/Sentry.Samples.Console.Native.csproj
@@ -4,30 +4,41 @@
Exe
enable
enable
- net8.0
+ net8.0
true
+ sentry-sdks
+ sentry-dotnet
- true
true
+ true
+
+
+ true
+
+
+
+
diff --git a/samples/Sentry.Samples.Console.Profiling/Program.cs b/samples/Sentry.Samples.Console.Profiling/Program.cs
index ef94176029..a8e461ce0c 100644
--- a/samples/Sentry.Samples.Console.Profiling/Program.cs
+++ b/samples/Sentry.Samples.Console.Profiling/Program.cs
@@ -8,9 +8,9 @@ private static void Main()
// Enable the SDK
using (SentrySdk.Init(options =>
{
- options.Dsn =
- // NOTE: ADD YOUR OWN DSN BELOW so you can see the events in your own Sentry account
- "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
+ // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
options.Debug = true;
// options.AutoSessionTracking = true;
diff --git a/samples/Sentry.Samples.Console.Profiling/Sentry.Samples.Console.Profiling.csproj b/samples/Sentry.Samples.Console.Profiling/Sentry.Samples.Console.Profiling.csproj
index 5b8ef066da..39df1b5704 100644
--- a/samples/Sentry.Samples.Console.Profiling/Sentry.Samples.Console.Profiling.csproj
+++ b/samples/Sentry.Samples.Console.Profiling/Sentry.Samples.Console.Profiling.csproj
@@ -5,6 +5,39 @@
net6.0
+
+
+
+ sentry-sdks
+ sentry-dotnet
+
+
+ true
+ true
+
+
+ true
+
+
+
+
+
+
diff --git a/samples/Sentry.Samples.EntityFramework/Program.cs b/samples/Sentry.Samples.EntityFramework/Program.cs
index 29493de6d3..5a4bd44343 100644
--- a/samples/Sentry.Samples.EntityFramework/Program.cs
+++ b/samples/Sentry.Samples.EntityFramework/Program.cs
@@ -2,14 +2,17 @@
using System.Data.Common;
using System.Data.Entity;
-using var _ = SentrySdk.Init(o =>
+using var _ = SentrySdk.Init(options =>
{
- o.Debug = true; // To see SDK logs on the console
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
- o.TracesSampleRate = 1.0;
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
+ // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+
+ options.Debug = true; // To see SDK logs on the console
+ options.TracesSampleRate = 1.0;
// Add the EntityFramework integration to the SentryOptions of your app startup code:
- o.AddEntityFramework();
+ options.AddEntityFramework();
});
var dbConnection = Effort.DbConnectionFactory.CreateTransient();
diff --git a/samples/Sentry.Samples.EntityFramework/Sentry.Samples.EntityFramework.csproj b/samples/Sentry.Samples.EntityFramework/Sentry.Samples.EntityFramework.csproj
index b1fcad204b..1c554bc094 100644
--- a/samples/Sentry.Samples.EntityFramework/Sentry.Samples.EntityFramework.csproj
+++ b/samples/Sentry.Samples.EntityFramework/Sentry.Samples.EntityFramework.csproj
@@ -5,6 +5,13 @@
net8.0
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj b/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj
index 138b6c23eb..c262f00213 100644
--- a/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj
+++ b/samples/Sentry.Samples.GenericHost/Sentry.Samples.GenericHost.csproj
@@ -11,6 +11,13 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.Google.Cloud.Functions/Sentry.Samples.Google.Cloud.Functions.csproj b/samples/Sentry.Samples.Google.Cloud.Functions/Sentry.Samples.Google.Cloud.Functions.csproj
index 0863b01fdc..917bd0e424 100644
--- a/samples/Sentry.Samples.Google.Cloud.Functions/Sentry.Samples.Google.Cloud.Functions.csproj
+++ b/samples/Sentry.Samples.Google.Cloud.Functions/Sentry.Samples.Google.Cloud.Functions.csproj
@@ -7,7 +7,6 @@
-
@@ -16,4 +15,15 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
+
+
+
+
diff --git a/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs b/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs
index 388f5aef64..659294bf97 100644
--- a/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs
+++ b/samples/Sentry.Samples.GraphQL.Client.Http/Program.cs
@@ -11,7 +11,10 @@
SentrySdk.Init(options =>
{
- // options.Dsn = "... Your DSN ...";
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
+ // // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+
options.CaptureFailedRequests = true;
options.SendDefaultPii = true;
options.TracesSampleRate = 1.0;
diff --git a/samples/Sentry.Samples.GraphQL.Client.Http/Sentry.Samples.GraphQL.Client.Http.csproj b/samples/Sentry.Samples.GraphQL.Client.Http/Sentry.Samples.GraphQL.Client.Http.csproj
index 28af485e3b..183f1fef77 100644
--- a/samples/Sentry.Samples.GraphQL.Client.Http/Sentry.Samples.GraphQL.Client.Http.csproj
+++ b/samples/Sentry.Samples.GraphQL.Client.Http/Sentry.Samples.GraphQL.Client.Http.csproj
@@ -1,11 +1,11 @@
-
- Exe
- net8.0
- enable
- enable
-
+
+ Exe
+ net8.0
+ enable
+ enable
+
@@ -13,6 +13,13 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.GraphQL.Server/Program.cs b/samples/Sentry.Samples.GraphQL.Server/Program.cs
index 0e8e53b0a6..2f63a90370 100644
--- a/samples/Sentry.Samples.GraphQL.Server/Program.cs
+++ b/samples/Sentry.Samples.GraphQL.Server/Program.cs
@@ -39,14 +39,16 @@ public static WebApplication BuildWebApplication(string[] args)
.AddSentry() // <-- Ensure telemetry is sent to Sentry
);
- builder.WebHost.UseSentry(o =>
+ builder.WebHost.UseSentry(options =>
{
- // A DSN is required. You can set it here, or in configuration, or in an environment variable.
- // o.Dsn = "...Your DSN Here...";
- o.TracesSampleRate = 1.0;
- o.Debug = true;
- o.SendDefaultPii = true;
- o.UseOpenTelemetry(); // <-- Configure Sentry to use OpenTelemetry trace information
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
+ // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+
+ options.TracesSampleRate = 1.0;
+ options.Debug = true;
+ options.SendDefaultPii = true;
+ options.UseOpenTelemetry(); // <-- Configure Sentry to use OpenTelemetry trace information
});
builder.Services
diff --git a/samples/Sentry.Samples.GraphQL.Server/Sentry.Samples.GraphQL.Server.csproj b/samples/Sentry.Samples.GraphQL.Server/Sentry.Samples.GraphQL.Server.csproj
index 80f82e9831..f0fdf28753 100644
--- a/samples/Sentry.Samples.GraphQL.Server/Sentry.Samples.GraphQL.Server.csproj
+++ b/samples/Sentry.Samples.GraphQL.Server/Sentry.Samples.GraphQL.Server.csproj
@@ -20,6 +20,13 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.Hangfire/Sentry.Samples.Hangfire.csproj b/samples/Sentry.Samples.Hangfire/Sentry.Samples.Hangfire.csproj
index 9508ba0abf..7268266316 100644
--- a/samples/Sentry.Samples.Hangfire/Sentry.Samples.Hangfire.csproj
+++ b/samples/Sentry.Samples.Hangfire/Sentry.Samples.Hangfire.csproj
@@ -12,6 +12,13 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.Hangfire/appsettings.json b/samples/Sentry.Samples.Hangfire/appsettings.json
new file mode 100644
index 0000000000..ebcd904504
--- /dev/null
+++ b/samples/Sentry.Samples.Hangfire/appsettings.json
@@ -0,0 +1,39 @@
+{
+ // Example configuration via JSON. Only a subset of the settings below:
+ // All Sentry settings can also be configured via code or environment variables:
+ "Sentry": {
+ // The DSN can also be set via environment variable
+ "Dsn": "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537",
+ // Opt-in for payload submission
+ "MaxRequestBodySize": "Always",
+ // Sends Cookies, User Id when one is logged on and user IP address to sentry. It's turned off by default.
+ "SendDefaultPii": true,
+ // Whether to add System.Diagnostics.Activity data to the event::
+ // For more: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Diagnostics.DiagnosticSource/src/ActivityUserGuide.md
+ "IncludeActivityData": true,
+ // Record any message with this level or higher as a breadcrumb (default is Information)
+ "MinimumBreadcrumbLevel": "Information",
+ // Don't only keep Warnings as Breadcrumb but actually send an event
+ "MinimumEventLevel": "Warning",
+ // Send the stack trace of captured messages (e.g: a LogWarning without an exception)
+ "AttachStackTrace": true,
+ // The flag below can be used to see the internal logs of the SDK in the applications log (it's off by default)
+ "Debug": true,
+ // By default the level is Debug but it can be changed to any level of SentryLevel enum
+ "DiagnosticLevel": "Error",
+ "DefaultTags": {
+ "default-key-in-config": "default-value"
+ }
+ },
+ "Logging": {
+ "IncludeScopes": false,
+ "LogLevel": {
+ "Default": "Trace"
+ }
+ },
+ "Kestrel": {
+ "EndpointDefaults": {
+ "Protocols": "Http2"
+ }
+ }
+}
diff --git a/samples/Sentry.Samples.Ios/AppDelegate.cs b/samples/Sentry.Samples.Ios/AppDelegate.cs
index 5d3b60396d..8ba822292f 100644
--- a/samples/Sentry.Samples.Ios/AppDelegate.cs
+++ b/samples/Sentry.Samples.Ios/AppDelegate.cs
@@ -12,17 +12,17 @@ public override UIWindow? Window
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// Init the Sentry SDK
- SentrySdk.Init(o =>
+ SentrySdk.Init(options =>
{
- o.Debug = true;
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
- o.TracesSampleRate = 1.0;
- o.ProfilesSampleRate = 1.0;
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ options.Debug = true;
+ options.TracesSampleRate = 1.0;
+ options.ProfilesSampleRate = 1.0;
// All the native iOS SDK options are available below
// https://docs.sentry.io/platforms/apple/guides/ios/configuration/
// Enable Native iOS SDK App Hangs detection
- o.Native.EnableAppHangTracking = true;
+ options.Native.EnableAppHangTracking = true;
});
// create a new window instance based on the screen size
diff --git a/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj b/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj
index 8126655549..1506de5f5e 100644
--- a/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj
+++ b/samples/Sentry.Samples.Ios/Sentry.Samples.Ios.csproj
@@ -10,29 +10,36 @@
true
-
-
-
-
-
-
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
-
+
iPhone Developer
+
+
+ sentry-sdks
+ sentry-dotnet
true
true
+
+
+
+
+
diff --git a/samples/Sentry.Samples.Log4Net/Sentry.Samples.Log4Net.csproj b/samples/Sentry.Samples.Log4Net/Sentry.Samples.Log4Net.csproj
index faca36903a..e443ac4155 100644
--- a/samples/Sentry.Samples.Log4Net/Sentry.Samples.Log4Net.csproj
+++ b/samples/Sentry.Samples.Log4Net/Sentry.Samples.Log4Net.csproj
@@ -6,6 +6,13 @@
3.5.234
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
diff --git a/samples/Sentry.Samples.ME.Logging/Program.cs b/samples/Sentry.Samples.ME.Logging/Program.cs
index 6c050c7fab..e782f184bc 100644
--- a/samples/Sentry.Samples.ME.Logging/Program.cs
+++ b/samples/Sentry.Samples.ME.Logging/Program.cs
@@ -4,25 +4,26 @@
using var loggerFactory = LoggerFactory.Create(builder =>
{
builder.AddConsole();
- builder.AddSentry(o =>
+ builder.AddSentry(options =>
{
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+
// Set to true to SDK debugging to see the internal messages through the logging library.
- o.Debug = false;
+ options.Debug = false;
// Configure the level of Sentry internal logging
- o.DiagnosticLevel = SentryLevel.Debug;
+ options.DiagnosticLevel = SentryLevel.Debug;
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
- o.MaxBreadcrumbs = 150; // Increasing from default 100
- o.Release = "e386dfd"; // If not set here, SDK looks for it on main assembly's AssemblyInformationalVersion and AssemblyVersion
+ options.MaxBreadcrumbs = 150; // Increasing from default 100
+ options.Release = "e386dfd"; // If not set here, SDK looks for it on main assembly's AssemblyInformationalVersion and AssemblyVersion
// Optionally configure options: The default values are:
- o.MinimumBreadcrumbLevel = LogLevel.Information; // It requires at least this level to store breadcrumb
- o.MinimumEventLevel = LogLevel.Error; // This level or above will result in event sent to Sentry
+ options.MinimumBreadcrumbLevel = LogLevel.Information; // It requires at least this level to store breadcrumb
+ options.MinimumEventLevel = LogLevel.Error; // This level or above will result in event sent to Sentry
// Don't keep as a breadcrumb or send events for messages of level less than Critical with exception of type DivideByZeroException
- o.AddLogEntryFilter((_, level, _, exception) => level < LogLevel.Critical && exception is DivideByZeroException);
+ options.AddLogEntryFilter((_, level, _, exception) => level < LogLevel.Critical && exception is DivideByZeroException);
- o.ConfigureScope(s => s.SetTag("RootScope", "sent with all events"));
+ options.ConfigureScope(s => s.SetTag("RootScope", "sent with all events"));
});
});
var logger = loggerFactory.CreateLogger();
diff --git a/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj b/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj
index 5f7cd8a94b..0d60cbe639 100644
--- a/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj
+++ b/samples/Sentry.Samples.ME.Logging/Sentry.Samples.ME.Logging.csproj
@@ -6,10 +6,18 @@
-
+
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
-
+
+
diff --git a/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs b/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs
index 0b92dab787..cb34e563df 100644
--- a/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs
+++ b/samples/Sentry.Samples.MacCatalyst/AppDelegate.cs
@@ -12,10 +12,10 @@ public override UIWindow? Window
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
// Init the Sentry SDK
- SentrySdk.Init(o =>
+ SentrySdk.Init(options =>
{
- o.Debug = true;
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ options.Debug = true;
});
// create a new window instance based on the screen size
diff --git a/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj b/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj
index 4dd38c17ca..b738bd244b 100644
--- a/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj
+++ b/samples/Sentry.Samples.MacCatalyst/Sentry.Samples.MacCatalyst.csproj
@@ -1,4 +1,5 @@
+
net8.0-maccatalyst
Exe
@@ -8,15 +9,12 @@
true
-
-
-
-
-
-
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
-
+
+ sentry-sdks
+ sentry-dotnet
true
true
+
+
+
+
+
+
diff --git a/samples/Sentry.Samples.MacOS/AppDelegate.cs b/samples/Sentry.Samples.MacOS/AppDelegate.cs
index ba5f4725d0..0477dd9eeb 100644
--- a/samples/Sentry.Samples.MacOS/AppDelegate.cs
+++ b/samples/Sentry.Samples.MacOS/AppDelegate.cs
@@ -6,11 +6,11 @@ public class AppDelegate : NSApplicationDelegate
public override void DidFinishLaunching(NSNotification notification)
{
// Init the Sentry SDK
- SentrySdk.Init(o =>
+ SentrySdk.Init(options =>
{
- o.Debug = true;
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
- o.TracesSampleRate = 1.0;
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+ options.Debug = true;
+ options.TracesSampleRate = 1.0;
});
}
}
diff --git a/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj b/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj
index 6e655889d6..6228d98e39 100644
--- a/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj
+++ b/samples/Sentry.Samples.MacOS/Sentry.Samples.MacOS.csproj
@@ -10,22 +10,24 @@
osx-arm64
+
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+
-
-
-
- true
- true
-
diff --git a/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj b/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj
index d8f2cda8ad..cf01a98dc5 100644
--- a/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj
+++ b/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj
@@ -40,14 +40,18 @@
It is not strictly necessary, but makes the demo sligtly cleaner.
-->
$(DefineConstants);DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
+
+
+
+ sentry-sdks
+ sentry-dotnet
- true
true
-
+ true
diff --git a/samples/Sentry.Samples.Serilog/Program.cs b/samples/Sentry.Samples.Serilog/Program.cs
index 700b1dde54..83818af586 100644
--- a/samples/Sentry.Samples.Serilog/Program.cs
+++ b/samples/Sentry.Samples.Serilog/Program.cs
@@ -12,19 +12,21 @@ private static void Main()
.MinimumLevel.Debug()
.WriteTo.Console()
// Other overloads exist, for example, configure the SDK with only the DSN or no parameters at all.
- .WriteTo.Sentry(o =>
+ .WriteTo.Sentry(options =>
{
+ // You can set here in code, or you can set it in the SENTRY_DSN environment variable.
+ // See https://docs.sentry.io/product/sentry-basics/dsn-explainer/
+ options.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
+
// Debug and higher are stored as breadcrumbs (default os Information)
- o.MinimumBreadcrumbLevel = LogEventLevel.Debug;
+ options.MinimumBreadcrumbLevel = LogEventLevel.Debug;
// Error and higher is sent as event (default is Error)
- o.MinimumEventLevel = LogEventLevel.Error;
- // If DSN is not set, the SDK will look for an environment variable called SENTRY_DSN. If nothing is found, SDK is disabled.
- o.Dsn = "https://eb18e953812b41c3aeb042e666fd3b5c@o447951.ingest.sentry.io/5428537";
- o.AttachStacktrace = true;
+ options.MinimumEventLevel = LogEventLevel.Error;
+ options.AttachStacktrace = true;
// send PII like the username of the user logged in to the device
- o.SendDefaultPii = true;
+ options.SendDefaultPii = true;
// Optional Serilog text formatter used to format LogEvent to string. If TextFormatter is set, FormatProvider is ignored.
- o.TextFormatter = new MessageTemplateTextFormatter("[{MyTaskId}] {Message}");
+ options.TextFormatter = new MessageTemplateTextFormatter("[{MyTaskId}] {Message}");
// Other configuration
})
.CreateLogger();
diff --git a/samples/Sentry.Samples.Serilog/Sentry.Samples.Serilog.csproj b/samples/Sentry.Samples.Serilog/Sentry.Samples.Serilog.csproj
index b0e929ae26..94f1a979d1 100644
--- a/samples/Sentry.Samples.Serilog/Sentry.Samples.Serilog.csproj
+++ b/samples/Sentry.Samples.Serilog/Sentry.Samples.Serilog.csproj
@@ -11,6 +11,13 @@
+
+ sentry-sdks
+ sentry-dotnet
+ true
+ true
+
+