Skip to content

Commit 0ef14f5

Browse files
committed
Updated existing default plugin list based on runtime
1 parent d378a1d commit 0ef14f5

File tree

9 files changed

+16
-10
lines changed

9 files changed

+16
-10
lines changed

src/Exceptionless.Portable/Plugins/Default/005_HandleAggregateExceptionsPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Exceptionless.Dependency;
33
using Exceptionless.Models;
44

5-
namespace Exceptionless.Plugins {
5+
namespace Exceptionless.Plugins.Default {
66
[Priority(5)]
77
public class HandleAggregateExceptionsPlugin : IEventPlugin {
88
public void Run(EventPluginContext context) {

src/Exceptionless.Portable/Plugins/Default/015_PrivateInformationPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System;
33
using Exceptionless.Dependency;
44

5-
namespace Exceptionless.Plugins {
5+
namespace Exceptionless.Plugins.Default {
66
[Priority(15)]
77
public class SetEnvironmentUserPlugin : IEventPlugin {
88
public void Run(EventPluginContext context) {

src/Exceptionless.Portable/Plugins/Default/020_ErrorPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Exceptionless.Extensions;
44
using Exceptionless.Models;
55

6-
namespace Exceptionless.Plugins {
6+
namespace Exceptionless.Plugins.Default {
77
[Priority(20)]
88
public class ErrorPlugin : IEventPlugin {
99
public void Run(EventPluginContext context) {

src/Exceptionless.Portable/Plugins/Default/025_SessionIdManagementPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22

3-
namespace Exceptionless.Plugins {
3+
namespace Exceptionless.Plugins.Default {
44
[Priority(25)]
55
public class SessionIdManagementPlugin : IEventPlugin {
66
public void Run(EventPluginContext context) {

src/Exceptionless.Portable/Plugins/Default/080_VersionPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using Exceptionless.Logging;
66
using Exceptionless.Models;
77

8-
namespace Exceptionless.Plugins {
8+
namespace Exceptionless.Plugins.Default {
99
[Priority(80)]
1010
public class VersionPlugin : IEventPlugin {
1111
private static bool _checkedForVersion;

src/Exceptionless.Portable/Plugins/Default/110_IgnoreUserAgentPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Exceptionless.Dependency;
33
using Exceptionless.Extensions;
44

5-
namespace Exceptionless.Plugins {
5+
namespace Exceptionless.Plugins.Default {
66
[Priority(110)]
77
public class IgnoreUserAgentPlugin : IEventPlugin {
88
public void Run(EventPluginContext context) {

src/Exceptionless.Portable/Plugins/EventPluginManager.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,16 @@ public static void AddDefaultPlugins(ExceptionlessConfiguration config) {
2727
config.AddPlugin<HandleAggregateExceptionsPlugin>();
2828
config.AddPlugin<EventExclusionPlugin>();
2929
config.AddPlugin<ConfigurationDefaultsPlugin>();
30+
#if !PORTABLE && !NETSTANDARD1_2
31+
config.AddPlugin<ErrorPlugin>();
32+
#else
3033
config.AddPlugin<SimpleErrorPlugin>();
34+
#endif
3135
config.AddPlugin<DuplicateCheckerPlugin>();
3236
config.AddPlugin<EnvironmentInfoPlugin>();
37+
#if !PORTABLE && !NETSTANDARD1_2
38+
config.AddPlugin<VersionPlugin>();
39+
#endif
3340
config.AddPlugin<SubmissionMethodPlugin>();
3441
config.AddPlugin<CancelSessionsWithNoUserPlugin>();
3542
}

src/Platforms/Exceptionless.AspNetCore/ExceptionlessExtensions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.Linq;
43
using Microsoft.AspNetCore.Builder;
54
using Microsoft.AspNetCore.Http;
6-
using Exceptionless;
75
using Exceptionless.AspNetCore;
86
using Exceptionless.Models;
97
using Exceptionless.Models.Data;
8+
using Exceptionless.Plugins.Default;
109
using Microsoft.Extensions.Configuration;
1110

1211
namespace Exceptionless {
@@ -17,7 +16,7 @@ public static IApplicationBuilder UseExceptionless(this IApplicationBuilder app,
1716

1817
client.Startup();
1918
client.Configuration.AddPlugin<ExceptionlessAspNetCorePlugin>();
20-
//client.Configuration.AddPlugin<IgnoreUserAgentPlugin>();
19+
client.Configuration.AddPlugin<IgnoreUserAgentPlugin>();
2120
//client.Configuration.Resolver.Register<ILastReferenceIdManager, WebLastReferenceIdManager>();
2221

2322
return app.UseMiddleware<ExceptionlessMiddleware>(client);

src/Platforms/Exceptionless.Web/WebLastReferenceIdManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Exceptionless.Logging;
44

55
namespace Exceptionless {
6-
internal class WebLastReferenceIdManager : ILastReferenceIdManager {
6+
internal sealed class WebLastReferenceIdManager : ILastReferenceIdManager {
77
private const string LAST_REFERENCE_ID_KEY = "__LastReferenceId";
88

99
public WebLastReferenceIdManager(IExceptionlessLog log) {

0 commit comments

Comments
 (0)