Skip to content

Commit

Permalink
update Verify 14.6 (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp authored Nov 26, 2021
1 parent 44bf979 commit 6aa0f70
Show file tree
Hide file tree
Showing 8 changed files with 2,886 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<Import Project="..\Directory.Build.props" />

<PropertyGroup>
<!-- some projects have transive dependencies on legacy TFW https://github.com/dotnet/announcements/issues/190 -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<IsPackable>false</IsPackable>
<!-- https://github.com/tonerdo/coverlet/issues/33#issuecomment-382748414 -->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down Expand Up @@ -42,7 +44,7 @@
<PackageReference Include="FluentAssertions" Version="6.2.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="Verify.Xunit" Version="14.2.0" />
<PackageReference Include="Verify.Xunit" Version="14.6.3" />
<PackageReference Include="PublicApiGenerator" Version="10.2.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
namespace Microsoft.AspNetCore.Builder
{
public static class SentryTracingMiddlewareExtensions { }
}
namespace Microsoft.AspNetCore.Hosting
{
public static class SentryWebHostBuilderExtensions { }
}
namespace Microsoft.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions { }
}
namespace Sentry.AspNetCore
{
public interface ISentryBuilder
{
Microsoft.Extensions.DependencyInjection.IServiceCollection Services { get; }
}
public interface IUserFactory
{
Sentry.User? Create(Microsoft.AspNetCore.Http.HttpContext context);
}
public static class SamplingExtensions
{
public static string? TryGetHttpMethod(this Sentry.TransactionSamplingContext samplingContext) { }
public static string? TryGetHttpPath(this Sentry.TransactionSamplingContext samplingContext) { }
public static string? TryGetHttpRoute(this Sentry.TransactionSamplingContext samplingContext) { }
}
public static class ScopeExtensions
{
public static void Populate(this Sentry.Scope scope, System.Diagnostics.Activity activity) { }
public static void Populate(this Sentry.Scope scope, Microsoft.AspNetCore.Http.HttpContext context, Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
}
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
public class SentryAspNetCoreLoggerProvider : Sentry.Extensions.Logging.SentryLoggerProvider
{
public SentryAspNetCoreLoggerProvider(Microsoft.Extensions.Options.IOptions<Sentry.AspNetCore.SentryAspNetCoreOptions> options, Sentry.IHub hub) { }
}
public class SentryAspNetCoreOptions : Sentry.Extensions.Logging.SentryLoggingOptions
{
public SentryAspNetCoreOptions() { }
public bool AdjustStandardEnvironmentNameCasing { get; set; }
public bool FlushOnCompletedRequest { get; set; }
public System.TimeSpan FlushTimeout { get; set; }
public bool IncludeActivityData { get; set; }
public Sentry.Extensibility.RequestSize MaxRequestBodySize { get; set; }
}
public class SentryAspNetCoreOptionsSetup : Microsoft.Extensions.Options.ConfigureFromConfigurationOptions<Sentry.AspNetCore.SentryAspNetCoreOptions>
{
public SentryAspNetCoreOptionsSetup(Microsoft.Extensions.Logging.Configuration.ILoggerProviderConfiguration<Sentry.AspNetCore.SentryAspNetCoreLoggerProvider> providerConfiguration, Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) { }
public override void Configure(Sentry.AspNetCore.SentryAspNetCoreOptions options) { }
}
public static class SentryBuilderExtensions
{
public static Sentry.AspNetCore.ISentryBuilder AddSentryOptions(this Sentry.AspNetCore.ISentryBuilder builder, System.Action<Sentry.AspNetCore.SentryAspNetCoreOptions>? configureOptions) { }
}
public class SentryStartupFilter : Microsoft.AspNetCore.Hosting.IStartupFilter
{
public SentryStartupFilter() { }
public System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> Configure(System.Action<Microsoft.AspNetCore.Builder.IApplicationBuilder> next) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
namespace Microsoft.Extensions.Logging
{
public static class LoggingBuilderExtensions { }
public static class SentryLoggerFactoryExtensions { }
}
namespace Sentry.Extensions.Logging
{
public class DelegateLogEntryFilter : Sentry.Extensions.Logging.ILogEntryFilter
{
public DelegateLogEntryFilter(System.Func<string, Microsoft.Extensions.Logging.LogLevel, Microsoft.Extensions.Logging.EventId, System.Exception?, bool> filter) { }
public bool Filter(string categoryName, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, System.Exception? exception) { }
}
public interface ILogEntryFilter
{
bool Filter(string categoryName, Microsoft.Extensions.Logging.LogLevel logLevel, Microsoft.Extensions.Logging.EventId eventId, System.Exception? exception);
}
public class MelDiagnosticLogger : Sentry.Extensibility.IDiagnosticLogger
{
public MelDiagnosticLogger(Microsoft.Extensions.Logging.ILogger<Sentry.ISentryClient> logger, Sentry.SentryLevel level) { }
public bool IsEnabled(Sentry.SentryLevel level) { }
public void Log(Sentry.SentryLevel logLevel, string message, System.Exception? exception = null, params object?[] args) { }
}
[Microsoft.Extensions.Logging.ProviderAlias("Sentry")]
public class SentryLoggerProvider : Microsoft.Extensions.Logging.ILoggerProvider, System.IDisposable
{
public SentryLoggerProvider(Microsoft.Extensions.Options.IOptions<Sentry.Extensions.Logging.SentryLoggingOptions> options, Sentry.IHub hub) { }
public Microsoft.Extensions.Logging.ILogger CreateLogger(string categoryName) { }
public void Dispose() { }
}
public class SentryLoggingOptions : Sentry.SentryOptions
{
public SentryLoggingOptions() { }
public bool InitializeSdk { get; set; }
public Microsoft.Extensions.Logging.LogLevel MinimumBreadcrumbLevel { get; set; }
public Microsoft.Extensions.Logging.LogLevel MinimumEventLevel { get; set; }
public void ConfigureScope(System.Action<Sentry.Scope> action) { }
}
public static class SentryLoggingOptionsExtensions
{
public static void AddLogEntryFilter(this Sentry.Extensions.Logging.SentryLoggingOptions options, Sentry.Extensions.Logging.ILogEntryFilter filter) { }
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) { }
}
}
namespace Sentry.Extensions.Logging.Extensions.DependencyInjection
{
public static class ServiceCollectionExtensions
{
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddSentry<TOptions>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services)
where TOptions : Sentry.Extensions.Logging.SentryLoggingOptions, new () { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[assembly: System.CLSCompliant(true)]
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
namespace Sentry.Log4Net
{
public class SentryAppender : log4net.Appender.AppenderSkeleton
{
public SentryAppender() { }
public string? Dsn { get; set; }
public string? Environment { get; set; }
public bool SendIdentity { get; set; }
protected override void Append(log4net.Core.LoggingEvent loggingEvent) { }
protected override void OnClose() { }
}
}
83 changes: 83 additions & 0 deletions test/Sentry.NLog.Tests/ApiApprovalTests.Run.Core2_1.verified.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[assembly: System.CLSCompliant(true)]
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
namespace NLog
{
public static class ConfigurationExtensions
{
public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, System.Action<Sentry.NLog.SentryNLogOptions>? optionsConfig = null) { }
public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, string? dsn, System.Action<Sentry.NLog.SentryNLogOptions>? optionsConfig = null) { }
public static NLog.Config.LoggingConfiguration AddSentry(this NLog.Config.LoggingConfiguration configuration, string? dsn, string targetName, System.Action<Sentry.NLog.SentryNLogOptions>? optionsConfig = null) { }
public static void AddTag(this Sentry.NLog.SentryNLogOptions options, string name, NLog.Layouts.Layout layout) { }
}
}
namespace Sentry.NLog
{
[NLog.Config.NLogConfigurationItem]
public class SentryNLogOptions : Sentry.SentryOptions
{
public SentryNLogOptions() { }
[NLog.Config.NLogConfigurationIgnoreProperty]
public NLog.Layouts.Layout? BreadcrumbCategoryLayout { get; set; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public NLog.Layouts.Layout? BreadcrumbLayout { get; set; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public NLog.Layouts.Layout? DsnLayout { get; set; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public NLog.Layouts.Layout? EnvironmentLayout { get; set; }
public System.TimeSpan FlushTimeout { get; set; }
public bool IgnoreEventsWithNoException { get; set; }
public bool IncludeEventDataOnBreadcrumbs { get; set; }
public bool IncludeEventPropertiesAsTags { get; set; }
public bool InitializeSdk { get; set; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public NLog.Layouts.Layout? Layout { get; set; }
public NLog.LogLevel? MinimumBreadcrumbLevel { get; set; }
public NLog.LogLevel? MinimumEventLevel { get; set; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public NLog.Layouts.Layout? ReleaseLayout { get; set; }
public int ShutdownTimeoutSeconds { get; set; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public System.Collections.Generic.IList<NLog.Targets.TargetPropertyWithContext> Tags { get; }
[NLog.Config.NLogConfigurationIgnoreProperty]
public Sentry.NLog.SentryNLogUser? User { get; set; }
}
[NLog.Config.NLogConfigurationItem]
public class SentryNLogUser
{
public SentryNLogUser() { }
public NLog.Layouts.Layout? Email { get; set; }
public NLog.Layouts.Layout? Id { get; set; }
public NLog.Layouts.Layout? IpAddress { get; set; }
[NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext?), "other")]
public System.Collections.Generic.IList<NLog.Targets.TargetPropertyWithContext>? Other { get; }
public NLog.Layouts.Layout? Username { get; set; }
}
[NLog.Targets.Target("Sentry")]
public sealed class SentryTarget : NLog.Targets.TargetWithContext
{
public SentryTarget() { }
public SentryTarget(Sentry.NLog.SentryNLogOptions options) { }
public NLog.Layouts.Layout? BreadcrumbCategory { get; set; }
public NLog.Layouts.Layout? BreadcrumbLayout { get; set; }
public NLog.Layouts.Layout? Dsn { get; set; }
public NLog.Layouts.Layout? Environment { get; set; }
public int FlushTimeoutSeconds { get; set; }
public bool IgnoreEventsWithNoException { get; set; }
public bool IncludeEventDataOnBreadcrumbs { get; set; }
public bool IncludeEventPropertiesAsTags { get; set; }
public bool InitializeSdk { get; set; }
public string MinimumBreadcrumbLevel { get; set; }
public string MinimumEventLevel { get; set; }
[NLog.Config.Advanced]
public Sentry.NLog.SentryNLogOptions Options { get; }
public NLog.Layouts.Layout? Release { get; set; }
public int ShutdownTimeoutSeconds { get; set; }
[NLog.Config.ArrayParameter(typeof(NLog.Targets.TargetPropertyWithContext), "tag")]
public System.Collections.Generic.IList<NLog.Targets.TargetPropertyWithContext> Tags { get; }
public Sentry.NLog.SentryNLogUser? User { get; set; }
protected override void CloseTarget() { }
protected override void FlushAsync(NLog.Common.AsyncContinuation asyncContinuation) { }
protected override void InitializeTarget() { }
protected override void Write(NLog.LogEventInfo logEvent) { }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[assembly: System.CLSCompliant(true)]
[assembly: System.Runtime.Versioning.TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
namespace Sentry.Serilog
{
public class SentrySerilogOptions : Sentry.SentryOptions
{
public SentrySerilogOptions() { }
public System.IFormatProvider? FormatProvider { get; set; }
public bool InitializeSdk { get; set; }
public Serilog.Events.LogEventLevel MinimumBreadcrumbLevel { get; set; }
public Serilog.Events.LogEventLevel MinimumEventLevel { get; set; }
public Serilog.Formatting.ITextFormatter? TextFormatter { get; set; }
}
}
namespace Serilog
{
public static class SentrySinkExtensions
{
public static void ConfigureSentrySerilogOptions(
Sentry.Serilog.SentrySerilogOptions sentrySerilogOptions,
string? dsn = null,
Serilog.Events.LogEventLevel? minimumEventLevel = default,
Serilog.Events.LogEventLevel? minimumBreadcrumbLevel = default,
System.IFormatProvider? formatProvider = null,
Serilog.Formatting.ITextFormatter? textFormatter = null,
bool? sendDefaultPii = default,
bool? isEnvironmentUser = default,
string? serverName = null,
bool? attachStackTrace = default,
int? maxBreadcrumbs = default,
float? sampleRate = default,
string? release = null,
string? environment = null,
int? maxQueueItems = default,
System.TimeSpan? shutdownTimeout = default,
System.Net.DecompressionMethods? decompressionMethods = default,
System.IO.Compression.CompressionLevel? requestBodyCompressionLevel = default,
bool? requestBodyCompressionBuffered = default,
bool? debug = default,
Sentry.SentryLevel? diagnosticLevel = default,
bool? reportAssemblies = default,
Sentry.DeduplicateMode? deduplicateMode = default,
bool? initializeSdk = default,
System.Collections.Generic.Dictionary<string, string>? defaultTags = null) { }
public static Serilog.LoggerConfiguration Sentry(this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration, System.Action<Sentry.Serilog.SentrySerilogOptions> configureOptions) { }
public static Serilog.LoggerConfiguration Sentry(
this Serilog.Configuration.LoggerSinkConfiguration loggerConfiguration,
string? dsn = null,
Serilog.Events.LogEventLevel minimumBreadcrumbLevel = 2,
Serilog.Events.LogEventLevel minimumEventLevel = 4,
System.IFormatProvider? formatProvider = null,
Serilog.Formatting.ITextFormatter? textFormatter = null,
bool? sendDefaultPii = default,
bool? isEnvironmentUser = default,
string? serverName = null,
bool? attachStackTrace = default,
int? maxBreadcrumbs = default,
float? sampleRate = default,
string? release = null,
string? environment = null,
int? maxQueueItems = default,
System.TimeSpan? shutdownTimeout = default,
System.Net.DecompressionMethods? decompressionMethods = default,
System.IO.Compression.CompressionLevel? requestBodyCompressionLevel = default,
bool? requestBodyCompressionBuffered = default,
bool? debug = default,
Sentry.SentryLevel? diagnosticLevel = default,
bool? reportAssemblies = default,
Sentry.DeduplicateMode? deduplicateMode = default,
bool? initializeSdk = default,
System.Collections.Generic.Dictionary<string, string>? defaultTags = null) { }
}
}
Loading

0 comments on commit 6aa0f70

Please sign in to comment.