Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ebced5a
feat: add Sentry.Quartz
michaelmairegger Oct 6, 2025
25d9335
refactor: optimize cron information retrieval in SentryCronJobListener
michaelmairegger Oct 7, 2025
6e8980d
refactor: swap ILogger dependency from SentryCronJobListener with IDi…
michaelmairegger Oct 7, 2025
3c2b354
refactor: simplify Quartz configuration by removing redundant service…
michaelmairegger Oct 7, 2025
399ba1f
refactor: migrate to Quartz v4.0.0 with .NET 10
michaelmairegger Aug 24, 2026
fecdedd
feat: include Sentry.Quartz in solution filter and generation scripts
michaelmairegger Aug 24, 2026
1f5b78f
Merge remote-tracking branch 'upstream/main' into feature/sentry.quartz
michaelmairegger Aug 24, 2026
625b3e8
feat: add Quartz sample showcasing Sentry integration
michaelmairegger Aug 24, 2026
b1c815b
fix: cursor github comments
michaelmairegger Aug 24, 2026
92b8e1e
refactor: simplify Quartz configuration and update project to use Web…
michaelmairegger Aug 24, 2026
ce9ff8f
refactor: replace SentryCronJobListener with SentryCronJobMiddleware …
michaelmairegger Aug 31, 2026
fd03cb7
fix: handling issue where current region might throw a CultureNotFoun…
michaelmairegger Aug 31, 2026
1abc08d
fix: sample project has different nuget package version
michaelmairegger Aug 31, 2026
6bf1550
fix: skip middleware execution for non-cron triggers
michaelmairegger Sep 1, 2026
8a53e47
refactor: rename and update Quartz extension method to AddSentryCronJob
michaelmairegger Sep 1, 2026
b698d17
feat: add SentryMetricsMiddleware to track Quartz job execution durat…
michaelmairegger Sep 1, 2026
c7a3068
refactor: simplify AddSentryCronJob method by removing unused service…
michaelmairegger Sep 1, 2026
a5a7323
feat: add SentryScopeMiddleware and extend Quartz integration with Ad…
michaelmairegger Sep 1, 2026
37e4272
refactor: move non-cron trigger check to StartQuartz method
michaelmairegger Sep 1, 2026
8e9c712
feat: add missing options parameter
michaelmairegger Sep 1, 2026
ba6f733
refactor: remove unused project reference to Sentry.AspNetCore in Sen…
michaelmairegger Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .generated.NoMobile.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<Project Path="samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj" />
<Project Path="samples/Sentry.Samples.OpenTelemetry.Console/Sentry.Samples.OpenTelemetry.Console.csproj" />
<Project Path="samples/Sentry.Samples.OpenTelemetry.MongoDB/Sentry.Samples.OpenTelemetry.MongoDB.csproj" />
<Project Path="samples/Sentry.Samples.Quartz/Sentry.Samples.Quartz.csproj" />
<Project Path="samples/Sentry.Samples.Serilog/Sentry.Samples.Serilog.csproj" />
</Folder>
<Folder Name="/scripts/">
Expand Down Expand Up @@ -168,6 +169,7 @@
<Project Path="src/Sentry.OpenTelemetry.Exporter/Sentry.OpenTelemetry.Exporter.csproj" />
<Project Path="src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj" />
<Project Path="src/Sentry.Profiling/Sentry.Profiling.csproj" />
<Project Path="src/Sentry.Quartz/Sentry.Quartz.csproj" />
<Project Path="src/Sentry.Serilog/Sentry.Serilog.csproj" />
<Project Path="src/Sentry/Sentry.csproj" />
</Folder>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Sentry SDK for .NET
| **Sentry.OpenTelemetry** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.OpenTelemetry.svg)](https://www.nuget.org/packages/Sentry.OpenTelemetry) | [![NuGet](https://img.shields.io/nuget/v/Sentry.OpenTelemetry.svg)](https://www.nuget.org/packages/Sentry.OpenTelemetry) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.OpenTelemetry.svg)](https://www.nuget.org/packages/Sentry.OpenTelemetry) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/tracing/instrumentation/opentelemetry/) |
| **Sentry.OpenTelemetry.Exporter** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.OpenTelemetry.Exporter.svg)](https://www.nuget.org/packages/Sentry.OpenTelemetry.Exporter) | [![NuGet](https://img.shields.io/nuget/v/Sentry.OpenTelemetry.Exporter.svg)](https://www.nuget.org/packages/Sentry.OpenTelemetry.Exporter) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.OpenTelemetry.Exporter.svg)](https://www.nuget.org/packages/Sentry.OpenTelemetry.Exporter) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/tracing/instrumentation/opentelemetry-otlp/) |
| **Sentry.Profiling** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.Profiling.svg)](https://www.nuget.org/packages/Sentry.Profiling) | [![NuGet](https://img.shields.io/nuget/v/Sentry.Profiling.svg)](https://www.nuget.org/packages/Sentry.Profiling) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.Profiling.svg)](https://www.nuget.org/packages/Sentry.Profiling) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/profiling/) |
| **Sentry.Quartz** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.Quartz.svg)](https://www.nuget.org/packages/Sentry.Quartz) | [![NuGet](https://img.shields.io/nuget/v/Sentry.Quartz.svg)](https://www.nuget.org/packages/Sentry.Quartz) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.Quartz.svg)](https://www.nuget.org/packages/Sentry.Quartz) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/crons/quartz/) |
| **Sentry.Serilog** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.Serilog.svg)](https://www.nuget.org/packages/Serilog) | [![NuGet](https://img.shields.io/nuget/v/Sentry.Serilog.svg)](https://www.nuget.org/packages/Sentry.Serilog) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.Serilog.svg)](https://www.nuget.org/packages/Sentry.Serilog) | [![Documentation](https://img.shields.io/badge/documentation-sentry.io-green.svg)](https://docs.sentry.io/platforms/dotnet/guides/serilog) |

## More Sentry .NET Integrations
Expand Down
2 changes: 2 additions & 0 deletions Sentry-CI-Build-Linux-NoMobile.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"samples\\Sentry.Samples.OpenTelemetry.AzureFunctions\\Sentry.Samples.OpenTelemetry.AzureFunctions.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.OpenTelemetry.MongoDB\\Sentry.Samples.OpenTelemetry.MongoDB.csproj",
"samples\\Sentry.Samples.Quartz\\Sentry.Samples.Quartz.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.AspNetCore.Blazor.WebAssembly\\Sentry.AspNetCore.Blazor.WebAssembly.csproj",
Expand All @@ -49,6 +50,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
2 changes: 2 additions & 0 deletions Sentry-CI-Build-Linux.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"samples\\Sentry.Samples.OpenTelemetry.AzureFunctions\\Sentry.Samples.OpenTelemetry.AzureFunctions.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.OpenTelemetry.MongoDB\\Sentry.Samples.OpenTelemetry.MongoDB.csproj",
"samples\\Sentry.Samples.Quartz\\Sentry.Samples.Quartz.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj",
Expand All @@ -55,6 +56,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
2 changes: 2 additions & 0 deletions Sentry-CI-Build-Windows-arm64.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"samples\\Sentry.Samples.OpenTelemetry.AzureFunctions\\Sentry.Samples.OpenTelemetry.AzureFunctions.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.OpenTelemetry.MongoDB\\Sentry.Samples.OpenTelemetry.MongoDB.csproj",
"samples\\Sentry.Samples.Quartz\\Sentry.Samples.Quartz.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj",
Expand All @@ -57,6 +58,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
2 changes: 2 additions & 0 deletions Sentry-CI-Build-Windows.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"samples\\Sentry.Samples.OpenTelemetry.AzureFunctions\\Sentry.Samples.OpenTelemetry.AzureFunctions.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.OpenTelemetry.MongoDB\\Sentry.Samples.OpenTelemetry.MongoDB.csproj",
"samples\\Sentry.Samples.Quartz\\Sentry.Samples.Quartz.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj",
Expand All @@ -57,6 +58,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
2 changes: 2 additions & 0 deletions Sentry-CI-Build-macOS.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"samples\\Sentry.Samples.OpenTelemetry.AzureFunctions\\Sentry.Samples.OpenTelemetry.AzureFunctions.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.OpenTelemetry.MongoDB\\Sentry.Samples.OpenTelemetry.MongoDB.csproj",
"samples\\Sentry.Samples.Quartz\\Sentry.Samples.Quartz.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.Android.AssemblyReader\\Sentry.Android.AssemblyReader.csproj",
Expand All @@ -62,6 +63,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
1 change: 1 addition & 0 deletions Sentry-CI-CodeQL.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj"
]
Expand Down
2 changes: 2 additions & 0 deletions Sentry.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
<Project Path="samples/Sentry.Samples.OpenTelemetry.AzureFunctions/Sentry.Samples.OpenTelemetry.AzureFunctions.csproj" />
<Project Path="samples/Sentry.Samples.OpenTelemetry.Console/Sentry.Samples.OpenTelemetry.Console.csproj" />
<Project Path="samples/Sentry.Samples.OpenTelemetry.MongoDB/Sentry.Samples.OpenTelemetry.MongoDB.csproj" />
<Project Path="samples/Sentry.Samples.Quartz/Sentry.Samples.Quartz.csproj" />
<Project Path="samples/Sentry.Samples.Serilog/Sentry.Samples.Serilog.csproj" />
</Folder>
<Folder Name="/scripts/">
Expand Down Expand Up @@ -168,6 +169,7 @@
<Project Path="src/Sentry.OpenTelemetry.Exporter/Sentry.OpenTelemetry.Exporter.csproj" />
<Project Path="src/Sentry.OpenTelemetry/Sentry.OpenTelemetry.csproj" />
<Project Path="src/Sentry.Profiling/Sentry.Profiling.csproj" />
<Project Path="src/Sentry.Quartz/Sentry.Quartz.csproj" />
<Project Path="src/Sentry.Serilog/Sentry.Serilog.csproj" />
<Project Path="src/Sentry/Sentry.csproj" />
</Folder>
Expand Down
1 change: 1 addition & 0 deletions SentryAspNetCore.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"src\\Sentry.Extensions.Logging\\Sentry.Extensions.Logging.csproj",
"src\\Sentry.Hangfire\\Sentry.Hangfire.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
2 changes: 2 additions & 0 deletions SentryNoMobile.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"samples\\Sentry.Samples.OpenTelemetry.AzureFunctions\\Sentry.Samples.OpenTelemetry.AzureFunctions.csproj",
"samples\\Sentry.Samples.OpenTelemetry.Console\\Sentry.Samples.OpenTelemetry.Console.csproj",
"samples\\Sentry.Samples.OpenTelemetry.MongoDB\\Sentry.Samples.OpenTelemetry.MongoDB.csproj",
"samples\\Sentry.Samples.Quartz\\Sentry.Samples.Quartz.csproj",
"samples\\Sentry.Samples.Serilog\\Sentry.Samples.Serilog.csproj",
"src\\Sentry.Analyzers\\Sentry.Analyzers.csproj",
"src\\Sentry.AspNet\\Sentry.AspNet.csproj",
Expand All @@ -51,6 +52,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
1 change: 1 addition & 0 deletions SentryNoSamples.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"src\\Sentry.OpenTelemetry.Exporter\\Sentry.OpenTelemetry.Exporter.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down
78 changes: 78 additions & 0 deletions samples/Sentry.Samples.Quartz/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Quartz;
using Sentry.Quartz;

namespace Sentry.Samples.Quartz;

public static class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);

builder.WebHost.UseSentry();

builder.Services.AddQuartz(quartz =>
{
quartz.UseSentry(builder.Services, options =>
{
var jobKey1 = new JobKey(nameof(FirstJob));
quartz.AddJob<FirstJob>(opts => opts.WithIdentity(jobKey1));
Comment thread
sentry[bot] marked this conversation as resolved.
quartz.AddTrigger<FirstJob>(opts => opts.ForJob(jobKey1).WithIdentity($"{nameof(FirstJob)}-trigger").WithCronSchedule("*/10 * * ? * *"));

var jobKey2 = new JobKey(nameof(SecondJob));
quartz.AddJob<SecondJob>(opts => opts.WithIdentity(jobKey2));
quartz.AddTrigger<SecondJob>(opts => opts.ForJob(jobKey2).WithIdentity($"{nameof(SecondJob)}-trigger").WithCronSchedule("*/10 * * ? * *"));

var jobKey3 = new JobKey(nameof(ThirdJob));
quartz.AddJob<ThirdJob>(opts => opts.WithIdentity(jobKey3));
quartz.AddTrigger<ThirdJob>(opts => opts.ForJob(jobKey3).WithIdentity($"{nameof(ThirdJob)}-trigger").WithCronSchedule("*/10 * * ? * *"));

if (!builder.Environment.IsProduction())
{
options.EnableUpsertCronMonitor = false;
}
});
Comment thread
michaelmairegger marked this conversation as resolved.
}).AddQuartzHostedService();

var app = builder.Build();

app.Run();
Comment thread
cursor[bot] marked this conversation as resolved.
}
}

[SentryCronMonitorSlug("first-job")]
public class FirstJob : IJob
{
public async ValueTask Execute(IJobExecutionContext context, CancellationToken cancellationToken)
{
Console.WriteLine($"Starting to do some heavy work at: {DateTime.Now}");
await Task.Delay(1000, cancellationToken);
Console.WriteLine($"Finished doing some heavy work at: {DateTime.Now}");
}
}

[SentryCronMonitorSlug("job-that-throws")]
public class SecondJob : IJob
{
public async ValueTask Execute(IJobExecutionContext context, CancellationToken cancellationToken)
{
Console.WriteLine($"Starting to do some heavy work at: {DateTime.Now}");
await Task.Delay(1000, cancellationToken);
Console.WriteLine($"Finished doing some heavy work at: {DateTime.Now}");
throw new Exception();
}
}

[SentryCronMonitorSlug("RecurringBackgroundJob")]
public class ThirdJob : IJob
{
public async ValueTask Execute(IJobExecutionContext context, CancellationToken cancellationToken)
{
Console.WriteLine($"Starting to do some heavy work at: {DateTime.Now}");
await Task.Delay(1000, cancellationToken);
Console.WriteLine($"Finished doing some heavy work at: {DateTime.Now}");
}
}
41 changes: 41 additions & 0 deletions samples/Sentry.Samples.Quartz/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:5138/",
"sslPort": 44386
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "hangfire",
"applicationUrl": "http://localhost:5138",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "hangfire",
"applicationUrl": "http://localhost:5138",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "hangfire",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
8 changes: 8 additions & 0 deletions samples/Sentry.Samples.Quartz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Sentry for Hangfire

This is a standard ASP.NET Core app with nothing in it but Quartz.
To run this sample:

```sh
dotnet run
```
24 changes: 24 additions & 0 deletions samples/Sentry.Samples.Quartz/Sentry.Samples.Quartz.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
Comment thread
cursor[bot] marked this conversation as resolved.

<ItemGroup>
<PackageReference Include="Quartz" Version="4.0.0-alpha.4" />
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<SentryOrg>sentry-sdks</SentryOrg>
<SentryProject>sentry-dotnet</SentryProject>
<SentryUploadSymbols>true</SentryUploadSymbols>
<SentryUploadSources>true</SentryUploadSources>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Sentry.Quartz\Sentry.Quartz.csproj" />
</ItemGroup>

</Project>
39 changes: 39 additions & 0 deletions samples/Sentry.Samples.Quartz/appsettings.json
Original file line number Diff line number Diff line change
@@ -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": "TODO: Configure your DSN here and uncomment this line",
// 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"
}
}
}
1 change: 1 addition & 0 deletions scripts/generate-solution-filters-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ filterConfigs:
- "**/Sentry.csproj"
- "**/Sentry.Analyzers.csproj"
- "**/Sentry.Hangfire.csproj"
- "**/Sentry.Quartz.csproj"
- "**/Sentry.Samples.Hangfire.csproj"
- "**/Sentry.Testing.csproj"
- "**/Sentry.Testing.CrashableApp.csproj"
Expand Down
Loading
Loading