Skip to content

Commit 6aa0f70

Browse files
authored
update Verify 14.6 (#1340)
1 parent 44bf979 commit 6aa0f70

File tree

8 files changed

+2886
-1
lines changed

8 files changed

+2886
-1
lines changed

test/Directory.Build.props

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<Import Project="..\Directory.Build.props" />
55

66
<PropertyGroup>
7+
<!-- some projects have transive dependencies on legacy TFW https://github.com/dotnet/announcements/issues/190 -->
8+
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
79
<IsPackable>false</IsPackable>
810
<!-- https://github.com/tonerdo/coverlet/issues/33#issuecomment-382748414 -->
911
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
@@ -42,7 +44,7 @@
4244
<PackageReference Include="FluentAssertions" Version="6.2.0" />
4345
<PackageReference Include="xunit" Version="2.4.1" />
4446
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
45-
<PackageReference Include="Verify.Xunit" Version="14.2.0" />
47+
<PackageReference Include="Verify.Xunit" Version="14.6.3" />
4648
<PackageReference Include="PublicApiGenerator" Version="10.2.0" />
4749
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
4850
</ItemGroup>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
2+
namespace Microsoft.AspNetCore.Builder
3+
{
4+
public static class SentryTracingMiddlewareExtensions { }
5+
}
6+
namespace Microsoft.AspNetCore.Hosting
7+
{
8+
public static class SentryWebHostBuilderExtensions { }
9+
}
10+
namespace Microsoft.Extensions.DependencyInjection
11+
{
12+
public static class ServiceCollectionExtensions { }
13+
}
14+
namespace Sentry.AspNetCore
15+
{
16+
public interface ISentryBuilder
17+
{
18+
Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; }
19+
}
20+
public interface IUserFactory
21+
{
22+
Sentry.User? Create(Microsoft.AspNetCore.Http.HttpContext context);
23+
}
24+
public static class SamplingExtensions
25+
{
26+
public static string? TryGetHttpMethod(this Sentry.TransactionSamplingContext samplingContext) { }
27+
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
28+
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
29+
}
30+
public static class ScopeExtensions
31+
{
32+
public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
33+
public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
34+
}
35+
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
36+
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
37+
{
38+
public SentryAspNetCoreLoggerProvider(Microsoft.Extensions.Options.IOptions<Sentry.AspNetCore.SentryAspNetCoreOptions> options, Sentry.IHub hub) { }
39+
}
40+
public class SentryAspNetCoreOptions : Sentry.Extensions.Logging.SentryLoggingOptions
41+
{
42+
public SentryAspNetCoreOptions() { }
43+
public bool AdjustStandardEnvironmentNameCasing { get; set; }
44+
public bool FlushOnCompletedRequest { get; set; }
45+
public System.TimeSpan FlushTimeout { get; set; }
46+
public bool IncludeActivityData { get; set; }
47+
public Sentry.Extensibility.RequestSize MaxRequestBodySize { get; set; }
48+
}
49+
public class SentryAspNetCoreOptionsSetup : Microsoft.Extensions.Options.ConfigureFromConfigurationOptions<Sentry.AspNetCore.SentryAspNetCoreOptions>
50+
{
51+
public SentryAspNetCoreOptionsSetup(Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfiguration<Sentry.AspNetCore.SentryAspNetCoreLoggerProvider> providerConfiguration, Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) { }
52+
public override void Configure(Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
53+
}
54+
public static class SentryBuilderExtensions
55+
{
56+
public static Sentry.AspNetCore.ISentryBuilder AddSentryOptions(this Sentry.AspNetCore.ISentryBuilder builder, System.Action<Sentry.AspNetCore.SentryAspNetCoreOptions>? configureOptions) { }
57+
}
58+
public class SentryStartupFilter : Microsoft.AspNetCore.Hosting.IStartupFilter
59+
{
60+
public SentryStartupFilter() { }
61+
public System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> Configure(System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> next) { }
62+
}
63+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
2+
namespace Microsoft.Extensions.Logging
3+
{
4+
public static class LoggingBuilderExtensions { }
5+
public static class SentryLoggerFactoryExtensions { }
6+
}
7+
namespace Sentry.Extensions.Logging
8+
{
9+
public class DelegateLogEntryFilter : Sentry.Extensions.Logging.ILogEntryFilter
10+
{
11+
public DelegateLogEntryFilter(System.Func<string, Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, System.Exception?, bool> filter) { }
12+
public bool Filter(string categoryName, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, System.Exception? exception) { }
13+
}
14+
public interface ILogEntryFilter
15+
{
16+
bool Filter(string categoryName, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, System.Exception? exception);
17+
}
18+
public class MelDiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger
19+
{
20+
public MelDiagnosticLogger(Microsoft.Extensions.Logging.ILogger<Sentry.ISentryClient> logger, Sentry.SentryLevel level) { }
21+
public bool IsEnabled(Sentry.SentryLevel level) { }
22+
public void Log(Sentry.SentryLevel logLevel, string message, System.Exception? exception = null, params object?[] args) { }
23+
}
24+
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
25+
public class SentryLoggerProvider : Microsoft.Extensions.Logging.ILoggerProvider, System.IDisposable
26+
{
27+
public SentryLoggerProvider(Microsoft.Extensions.Options.IOptions<Sentry.Extensions.Logging.SentryLoggingOptions> options, Sentry.IHub hub) { }
28+
public Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName) { }
29+
public void Dispose() { }
30+
}
31+
public class SentryLoggingOptions : Sentry.SentryOptions
32+
{
33+
public SentryLoggingOptions() { }
34+
public bool InitializeSdk { get; set; }
35+
public Microsoft.Extensions.Logging.LogLevel MinimumBreadcrumbLevel { get; set; }
36+
public Microsoft.Extensions.Logging.LogLevel MinimumEventLevel { get; set; }
37+
public void ConfigureScope(System.Action<Sentry.Scope> action) { }
38+
}
39+
public static class SentryLoggingOptionsExtensions
40+
{
41+
public static void AddLogEntryFilter(this Sentry.Extensions.Logging.SentryLoggingOptions options, Sentry.Extensions.Logging.ILogEntryFilter filter) { }
42+
public static void AddLogEntryFilter(this Sentry.Extensions.Logging.SentryLoggingOptions options, System.Func<string, Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, System.Exception?, bool> filter) { }
43+
}
44+
}
45+
namespace Sentry.Extensions.Logging.Extensions.DependencyInjection
46+
{
47+
public static class ServiceCollectionExtensions
48+
{
49+
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSentry<TOptions>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services)
50+
where TOptions : Sentry.Extensions.Logging.SentryLoggingOptions, new () { }
51+
}
52+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[assembly: System.CLSCompliant(true)]
2+
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
3+
namespace Sentry.Log4Net
4+
{
5+
public class SentryAppender : log4net.Appender.AppenderSkeleton
6+
{
7+
public SentryAppender() { }
8+
public string? Dsn { get; set; }
9+
public string? Environment { get; set; }
10+
public bool SendIdentity { get; set; }
11+
protected override void Append(log4net.Core.LoggingEvent loggingEvent) { }
12+
protected override void OnClose() { }
13+
}
14+
}
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
[assembly: System.CLSCompliant(true)]
2+
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
3+
namespace NLog
4+
{
5+
public static class ConfigurationExtensions
6+
{
7+
public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, System.Action<Sentry.NLog.SentryNLogOptions>? optionsConfig = null) { }
8+
public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, string? dsn, System.Action<Sentry.NLog.SentryNLogOptions>? optionsConfig = null) { }
9+
public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, string? dsn, string targetName, System.Action<Sentry.NLog.SentryNLogOptions>? optionsConfig = null) { }
10+
public static void AddTag(this Sentry.NLog.SentryNLogOptions options, string name, NLog.Layouts.Layout layout) { }
11+
}
12+
}
13+
namespace Sentry.NLog
14+
{
15+
[NLog.Config.NLogConfigurationItem]
16+
public class SentryNLogOptions : Sentry.SentryOptions
17+
{
18+
public SentryNLogOptions() { }
19+
[NLog.Config.NLogConfigurationIgnoreProperty]
20+
public NLog.Layouts.Layout? BreadcrumbCategoryLayout { get; set; }
21+
[NLog.Config.NLogConfigurationIgnoreProperty]
22+
public NLog.Layouts.Layout? BreadcrumbLayout { get; set; }
23+
[NLog.Config.NLogConfigurationIgnoreProperty]
24+
public NLog.Layouts.Layout? DsnLayout { get; set; }
25+
[NLog.Config.NLogConfigurationIgnoreProperty]
26+
public NLog.Layouts.Layout? EnvironmentLayout { get; set; }
27+
public System.TimeSpan FlushTimeout { get; set; }
28+
public bool IgnoreEventsWithNoException { get; set; }
29+
public bool IncludeEventDataOnBreadcrumbs { get; set; }
30+
public bool IncludeEventPropertiesAsTags { get; set; }
31+
public bool InitializeSdk { get; set; }
32+
[NLog.Config.NLogConfigurationIgnoreProperty]
33+
public NLog.Layouts.Layout? Layout { get; set; }
34+
public NLog.LogLevel? MinimumBreadcrumbLevel { get; set; }
35+
public NLog.LogLevel? MinimumEventLevel { get; set; }
36+
[NLog.Config.NLogConfigurationIgnoreProperty]
37+
public NLog.Layouts.Layout? ReleaseLayout { get; set; }
38+
public int ShutdownTimeoutSeconds { get; set; }
39+
[NLog.Config.NLogConfigurationIgnoreProperty]
40+
public System.Collections.Generic.IList<NLog.Targets.TargetPropertyWithContext> Tags { get; }
41+
[NLog.Config.NLogConfigurationIgnoreProperty]
42+
public Sentry.NLog.SentryNLogUser? User { get; set; }
43+
}
44+
[NLog.Config.NLogConfigurationItem]
45+
public class SentryNLogUser
46+
{
47+
public SentryNLogUser() { }
48+
public NLog.Layouts.Layout? Email { get; set; }
49+
public NLog.Layouts.Layout? Id { get; set; }
50+
public NLog.Layouts.Layout? IpAddress { get; set; }
51+
[NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext?), "other")]
52+
public System.Collections.Generic.IList<NLog.Targets.TargetPropertyWithContext>? Other { get; }
53+
public NLog.Layouts.Layout? Username { get; set; }
54+
}
55+
[NLog.Targets.Target("Sentry")]
56+
public sealed class SentryTarget : NLog.Targets.TargetWithContext
57+
{
58+
public SentryTarget() { }
59+
public SentryTarget(Sentry.NLog.SentryNLogOptions options) { }
60+
public NLog.Layouts.Layout? BreadcrumbCategory { get; set; }
61+
public NLog.Layouts.Layout? BreadcrumbLayout { get; set; }
62+
public NLog.Layouts.Layout? Dsn { get; set; }
63+
public NLog.Layouts.Layout? Environment { get; set; }
64+
public int FlushTimeoutSeconds { get; set; }
65+
public bool IgnoreEventsWithNoException { get; set; }
66+
public bool IncludeEventDataOnBreadcrumbs { get; set; }
67+
public bool IncludeEventPropertiesAsTags { get; set; }
68+
public bool InitializeSdk { get; set; }
69+
public string MinimumBreadcrumbLevel { get; set; }
70+
public string MinimumEventLevel { get; set; }
71+
[NLog.Config.Advanced]
72+
public Sentry.NLog.SentryNLogOptions Options { get; }
73+
public NLog.Layouts.Layout? Release { get; set; }
74+
public int ShutdownTimeoutSeconds { get; set; }
75+
[NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext), "tag")]
76+
public System.Collections.Generic.IList<NLog.Targets.TargetPropertyWithContext> Tags { get; }
77+
public Sentry.NLog.SentryNLogUser? User { get; set; }
78+
protected override void CloseTarget() { }
79+
protected override void FlushAsync(NLog.Common.AsyncContinuation asyncContinuation) { }
80+
protected override void InitializeTarget() { }
81+
protected override void Write(NLog.LogEventInfo logEvent) { }
82+
}
83+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
[assembly: System.CLSCompliant(true)]
2+
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
3+
namespace Sentry.Serilog
4+
{
5+
public class SentrySerilogOptions : Sentry.SentryOptions
6+
{
7+
public SentrySerilogOptions() { }
8+
public System.IFormatProvider? FormatProvider { get; set; }
9+
public bool InitializeSdk { get; set; }
10+
public Serilog.Events.LogEventLevel MinimumBreadcrumbLevel { get; set; }
11+
public Serilog.Events.LogEventLevel MinimumEventLevel { get; set; }
12+
public Serilog.Formatting.ITextFormatter? TextFormatter { get; set; }
13+
}
14+
}
15+
namespace Serilog
16+
{
17+
public static class SentrySinkExtensions
18+
{
19+
public static void ConfigureSentrySerilogOptions(
20+
Sentry.Serilog.SentrySerilogOptions sentrySerilogOptions,
21+
string? dsn = null,
22+
Serilog.Events.LogEventLevel? minimumEventLevel = default,
23+
Serilog.Events.LogEventLevel? minimumBreadcrumbLevel = default,
24+
System.IFormatProvider? formatProvider = null,
25+
Serilog.Formatting.ITextFormatter? textFormatter = null,
26+
bool? sendDefaultPii = default,
27+
bool? isEnvironmentUser = default,
28+
string? serverName = null,
29+
bool? attachStackTrace = default,
30+
int? maxBreadcrumbs = default,
31+
float? sampleRate = default,
32+
string? release = null,
33+
string? environment = null,
34+
int? maxQueueItems = default,
35+
System.TimeSpan? shutdownTimeout = default,
36+
System.Net.DecompressionMethods? decompressionMethods = default,
37+
System.IO.Compression.CompressionLevel? requestBodyCompressionLevel = default,
38+
bool? requestBodyCompressionBuffered = default,
39+
bool? debug = default,
40+
Sentry.SentryLevel? diagnosticLevel = default,
41+
bool? reportAssemblies = default,
42+
Sentry.DeduplicateMode? deduplicateMode = default,
43+
bool? initializeSdk = default,
44+
System.Collections.Generic.Dictionary<string, string>? defaultTags = null) { }
45+
public static Serilog.LoggerConfiguration Sentry(this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration, System.Action<Sentry.Serilog.SentrySerilogOptions> configureOptions) { }
46+
public static Serilog.LoggerConfiguration Sentry(
47+
this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration,
48+
string? dsn = null,
49+
Serilog.Events.LogEventLevel minimumBreadcrumbLevel = 2,
50+
Serilog.Events.LogEventLevel minimumEventLevel = 4,
51+
System.IFormatProvider? formatProvider = null,
52+
Serilog.Formatting.ITextFormatter? textFormatter = null,
53+
bool? sendDefaultPii = default,
54+
bool? isEnvironmentUser = default,
55+
string? serverName = null,
56+
bool? attachStackTrace = default,
57+
int? maxBreadcrumbs = default,
58+
float? sampleRate = default,
59+
string? release = null,
60+
string? environment = null,
61+
int? maxQueueItems = default,
62+
System.TimeSpan? shutdownTimeout = default,
63+
System.Net.DecompressionMethods? decompressionMethods = default,
64+
System.IO.Compression.CompressionLevel? requestBodyCompressionLevel = default,
65+
bool? requestBodyCompressionBuffered = default,
66+
bool? debug = default,
67+
Sentry.SentryLevel? diagnosticLevel = default,
68+
bool? reportAssemblies = default,
69+
Sentry.DeduplicateMode? deduplicateMode = default,
70+
bool? initializeSdk = default,
71+
System.Collections.Generic.Dictionary<string, string>? defaultTags = null) { }
72+
}
73+
}

0 commit comments

Comments
 (0)