Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .craft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ targets:
name: Sentry.Quartz
packageUrl: https://www.nuget.org/packages/Sentry.Quartz
mainDocsUrl: https://docs.sentry.io/platforms/dotnet/crons/quartz/
nuget:Sentry.Quartz3:
name: Sentry.Quartz3
packageUrl: https://www.nuget.org/packages/Sentry.Quartz3
mainDocsUrl: https://docs.sentry.io/platforms/dotnet/crons/quartz/
2 changes: 2 additions & 0 deletions .generated.NoMobile.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
<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.Quartz3/Sentry.Quartz3.csproj" />
<Project Path="src/Sentry.Serilog/Sentry.Serilog.csproj" />
<Project Path="src/Sentry/Sentry.csproj" />
</Folder>
Expand Down Expand Up @@ -205,6 +206,7 @@
<Project Path="test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj" />
<Project Path="test/Sentry.Profiling.Tests/Sentry.Profiling.Tests.csproj" />
<Project Path="test/Sentry.Quartz.Tests/Sentry.Quartz.Tests.csproj" />
<Project Path="test/Sentry.Quartz3.Tests/Sentry.Quartz3.Tests.csproj" />
<Project Path="test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj" />
<Project Path="test/Sentry.Testing.CrashableApp/Sentry.Testing.CrashableApp.csproj" />
<Project Path="test/Sentry.Testing/Sentry.Testing.csproj" />
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ body:
- Sentry.OpenTelemetry
- Sentry.Profiling
- Sentry.Quartz
- Sentry.Quartz3
- Sentry.Serilog
- Other
validations:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ Sentry SDK for .NET
| **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.Quartz3** | [![Downloads](https://img.shields.io/nuget/dt/Sentry.Quartz3.svg)](https://www.nuget.org/packages/Sentry.Quartz3) | [![NuGet](https://img.shields.io/nuget/v/Sentry.Quartz3.svg)](https://www.nuget.org/packages/Sentry.Quartz3) | [![NuGet](https://img.shields.io/nuget/vpre/Sentry.Quartz3.svg)](https://www.nuget.org/packages/Sentry.Quartz3) | [![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) |

Use Sentry.Quartz3 with Quartz.NET 3.x (3.6.0 or later) and Sentry.Quartz with Quartz.NET 4.x.

## More Sentry .NET Integrations

Sentry offers other integrations that are not part of this repository:
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 @@ -51,6 +51,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand All @@ -73,6 +74,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.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 @@ -57,6 +57,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand All @@ -82,6 +83,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.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 @@ -59,6 +59,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand All @@ -81,6 +82,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.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 @@ -59,6 +59,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand All @@ -84,6 +85,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.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 @@ -64,6 +64,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand All @@ -90,6 +91,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.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 @@ -23,6 +23,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.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 @@ -170,6 +170,7 @@
<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.Quartz3/Sentry.Quartz3.csproj" />
<Project Path="src/Sentry.Serilog/Sentry.Serilog.csproj" />
<Project Path="src/Sentry/Sentry.csproj" />
</Folder>
Expand Down Expand Up @@ -205,6 +206,7 @@
<Project Path="test/Sentry.OpenTelemetry.Tests/Sentry.OpenTelemetry.Tests.csproj" />
<Project Path="test/Sentry.Profiling.Tests/Sentry.Profiling.Tests.csproj" />
<Project Path="test/Sentry.Quartz.Tests/Sentry.Quartz.Tests.csproj" />
<Project Path="test/Sentry.Quartz3.Tests/Sentry.Quartz3.Tests.csproj" />
<Project Path="test/Sentry.Serilog.Tests/Sentry.Serilog.Tests.csproj" />
<Project Path="test/Sentry.Testing.CrashableApp/Sentry.Testing.CrashableApp.csproj" />
<Project Path="test/Sentry.Testing/Sentry.Testing.csproj" />
Expand Down
1 change: 1 addition & 0 deletions SentryAspNetCore.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"src\\Sentry.Hangfire\\Sentry.Hangfire.csproj",
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.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 @@ -53,6 +53,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand All @@ -78,6 +79,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.csproj",
Expand Down
2 changes: 2 additions & 0 deletions SentryNoSamples.slnf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"src\\Sentry.OpenTelemetry\\Sentry.OpenTelemetry.csproj",
"src\\Sentry.Profiling\\Sentry.Profiling.csproj",
"src\\Sentry.Quartz\\Sentry.Quartz.csproj",
"src\\Sentry.Quartz3\\Sentry.Quartz3.csproj",
"src\\Sentry.Serilog\\Sentry.Serilog.csproj",
"src\\Sentry\\Sentry.csproj",
"test\\Sentry.Analyzers.Tests\\Sentry.Analyzers.Tests.csproj",
Expand Down Expand Up @@ -52,6 +53,7 @@
"test\\Sentry.OpenTelemetry.Tests\\Sentry.OpenTelemetry.Tests.csproj",
"test\\Sentry.Profiling.Tests\\Sentry.Profiling.Tests.csproj",
"test\\Sentry.Quartz.Tests\\Sentry.Quartz.Tests.csproj",
"test\\Sentry.Quartz3.Tests\\Sentry.Quartz3.Tests.csproj",
"test\\Sentry.Serilog.Tests\\Sentry.Serilog.Tests.csproj",
"test\\Sentry.Testing.CrashableApp\\Sentry.Testing.CrashableApp.csproj",
"test\\Sentry.Testing\\Sentry.Testing.csproj",
Expand Down
1 change: 1 addition & 0 deletions scripts/generate-solution-filters-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ filterConfigs:
- "**/Sentry.Analyzers.csproj"
- "**/Sentry.Hangfire.csproj"
- "**/Sentry.Quartz.csproj"
- "**/Sentry.Quartz3.csproj"
- "**/Sentry.Samples.Hangfire.csproj"
- "**/Sentry.Testing.csproj"
- "**/Sentry.Testing.CrashableApp.csproj"
Expand Down
18 changes: 18 additions & 0 deletions src/Sentry.Quartz3/QuartzApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Quartz;

namespace Sentry.Quartz;

// The Quartz 3 side of the APIs that differ between Quartz 3 and 4
internal static class QuartzApi
{
// Quartz 3 needs exactly one day field to be '?', and the other decides
public static bool UnionsDayFields => false;

public static Type GetJobType(IJobDetail jobDetail) => jobDetail.JobType;

public static async Task<bool> HasSeveralTriggersAsync(IJobExecutionContext context, CancellationToken cancellationToken)
{
var triggers = await context.Scheduler.GetTriggersOfJob(context.JobDetail.Key, cancellationToken).ConfigureAwait(false);
return triggers.Count > 1;
}
}
29 changes: 29 additions & 0 deletions src/Sentry.Quartz3/Sentry.Quartz3.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Description>Official Quartz.NET 3.x integration for Sentry - Open-source error tracking that helps developers monitor and fix crashes in real time.</Description>
<PackageTags>$(PackageTags);Quartz;Crons</PackageTags>
<TargetFrameworks>$(CurrentTfms);net462</TargetFrameworks>
<RootNamespace>Sentry.Quartz</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition="'$(EnableAot)' == 'true'">
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>

<!-- Shared with Sentry.Quartz. Only the hooks and the APIs that differ are version-specific. -->
<ItemGroup>
<Compile Include="..\Sentry.Quartz\Core\**\*.cs" Link="Core\%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Sentry\Sentry.csproj" />
<!-- Quartz 4.x changed IJobListener to return ValueTask. Use Sentry.Quartz for it. -->
<PackageReference Include="Quartz" Version="[3.6.0,4.0.0)" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Sentry.Quartz3.Tests" PublicKey="$(SentryPublicKey)" />
</ItemGroup>

</Project>
77 changes: 77 additions & 0 deletions src/Sentry.Quartz3/SentryJobListener.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using Quartz;
using Sentry.Extensibility;

namespace Sentry.Quartz;

/// <summary>
/// A Quartz.NET job listener that sends a Sentry check-in each time a job with
/// <see cref="SentryCronMonitorSlugAttribute"/> runs.
/// </summary>
public class SentryJobListener : IJobListener
{
// Keyed on the context, which Quartz passes to both callbacks of a run
private readonly ConditionalWeakTable<IJobExecutionContext, JobCheckIn> _checkIns = new();
private readonly JobMonitor _monitor;

/// <summary>
/// Creates a listener with the default options.
/// </summary>
public SentryJobListener() : this(new SentryQuartzOptions())
{
}

/// <summary>
/// Creates a listener with the given options.
/// </summary>
/// <param name="options">The options.</param>
public SentryJobListener(SentryQuartzOptions options) : this(options, HubAdapter.Instance)
{
}

internal SentryJobListener(SentryQuartzOptions options, IHub hub, IDiagnosticLogger? logger = null)
{
_monitor = new JobMonitor(options, hub, logger);

// Quartz 4 default-implements IJobListener with ValueTask methods, so ours would never be called
var quartzVersion = typeof(IJobListener).Assembly.GetName().Version;
if (IsUnsupportedQuartzVersion(quartzVersion))
{
_monitor.Logger?.LogError("Sentry.Quartz3 supports Quartz.NET 3.x, but Quartz.NET {0} is loaded, so no " +
"check-ins will be sent. Use the Sentry.Quartz package for Quartz.NET 4.x.", quartzVersion);
}
}

internal static bool IsUnsupportedQuartzVersion(Version? version) => version is { Major: >= 4 };

/// <inheritdoc />
public string Name => "Sentry";

/// <inheritdoc />
public async Task JobToBeExecuted(IJobExecutionContext context, CancellationToken cancellationToken = default)
{
if (await _monitor.StartAsync(context, cancellationToken).ConfigureAwait(false) is { } checkIn)
{
_checkIns.Remove(context);
_checkIns.Add(context, checkIn);
}
}

/// <inheritdoc />
public Task JobWasExecuted(
IJobExecutionContext context,
JobExecutionException? jobException,
CancellationToken cancellationToken = default)
{
if (_checkIns.TryGetValue(context, out var checkIn))
{
_checkIns.Remove(context);
_monitor.Finish(checkIn, failed: jobException is not null, context.JobRunTime);
}

return Task.CompletedTask;
}

/// <inheritdoc />
public Task JobExecutionVetoed(IJobExecutionContext context, CancellationToken cancellationToken = default) =>
Task.CompletedTask;
}
2 changes: 2 additions & 0 deletions src/Sentry/Sentry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@
<InternalsVisibleTo Include="Sentry.Profiling.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Quartz" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Quartz.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Quartz3" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Quartz3.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Serilog" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Serilog.Tests" PublicKey="$(SentryPublicKey)" />
<InternalsVisibleTo Include="Sentry.Testing" PublicKey="$(SentryPublicKey)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace Sentry.Quartz
{
[System.AttributeUsage(System.AttributeTargets.Class)]
public sealed class SentryCronMonitorSlugAttribute : System.Attribute
{
public const string JobDataKey = "SentryMonitorSlug";
public SentryCronMonitorSlugAttribute(string? monitorSlug = null) { }
public string? MonitorSlug { get; }
public bool SendMonitorConfig { get; set; }
}
public class SentryJobListener : Quartz.IJobListener
{
public SentryJobListener() { }
public SentryJobListener(Sentry.Quartz.SentryQuartzOptions options) { }
public string Name { get; }
public System.Threading.Tasks.Task JobExecutionVetoed(Quartz.IJobExecutionContext context, System.Threading.CancellationToken cancellationToken = default) { }
public System.Threading.Tasks.Task JobToBeExecuted(Quartz.IJobExecutionContext context, System.Threading.CancellationToken cancellationToken = default) { }
public System.Threading.Tasks.Task JobWasExecuted(Quartz.IJobExecutionContext context, Quartz.JobExecutionException? jobException, System.Threading.CancellationToken cancellationToken = default) { }
}
public class SentryQuartzOptions
{
public SentryQuartzOptions() { }
public System.Action<Quartz.IJobExecutionContext, Sentry.SentryMonitorOptions>? ConfigureMonitorOptions { get; set; }
public bool SendMonitorConfig { get; set; }
}
}
Loading
Loading