From 43ba69c050e890e22b2205d37bfd4e304dc26b53 Mon Sep 17 00:00:00 2001 From: Nuno Dias Date: Fri, 28 Mar 2025 23:16:10 +0100 Subject: [PATCH 1/2] Get tags from appSettings --- samples/Exceptionless.SampleMvc/Web.config | 1 + .../Extensions/ExceptionlessConfigurationExtensions.cs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/samples/Exceptionless.SampleMvc/Web.config b/samples/Exceptionless.SampleMvc/Web.config index eb5fdeb9..0a9caa0c 100644 --- a/samples/Exceptionless.SampleMvc/Web.config +++ b/samples/Exceptionless.SampleMvc/Web.config @@ -3,6 +3,7 @@ + diff --git a/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs b/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs index 2f469598..d4c08659 100644 --- a/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs +++ b/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs @@ -390,6 +390,11 @@ public static void ReadFromAppSettings(this ExceptionlessConfiguration config) { string serverUrl = ConfigurationManager.AppSettings["Exceptionless:ServerUrl"]; if (!String.IsNullOrEmpty(serverUrl)) config.ServerUrl = serverUrl; + + string tags = ConfigurationManager.AppSettings["Exceptionless:Tags"]; + if (!String.IsNullOrEmpty(tags)) + foreach (var tag in tags.SplitAndTrim(',').Where(tag => !String.IsNullOrEmpty(tag))) + config.DefaultTags.Add(tag); } #endif From 923623c72d092f6f333a0df687856cfddff8e8b8 Mon Sep 17 00:00:00 2001 From: Nuno Dias Date: Mon, 31 Mar 2025 16:52:34 +0200 Subject: [PATCH 2/2] Update Tags to DefaultTags --- samples/Exceptionless.SampleMvc/Web.config | 2 +- .../Extensions/ExceptionlessConfigurationExtensions.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/Exceptionless.SampleMvc/Web.config b/samples/Exceptionless.SampleMvc/Web.config index 0a9caa0c..c8c9eaa3 100644 --- a/samples/Exceptionless.SampleMvc/Web.config +++ b/samples/Exceptionless.SampleMvc/Web.config @@ -3,7 +3,7 @@ - + diff --git a/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs b/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs index d4c08659..6050d569 100644 --- a/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs +++ b/src/Exceptionless/Extensions/ExceptionlessConfigurationExtensions.cs @@ -391,9 +391,9 @@ public static void ReadFromAppSettings(this ExceptionlessConfiguration config) { if (!String.IsNullOrEmpty(serverUrl)) config.ServerUrl = serverUrl; - string tags = ConfigurationManager.AppSettings["Exceptionless:Tags"]; - if (!String.IsNullOrEmpty(tags)) - foreach (var tag in tags.SplitAndTrim(',').Where(tag => !String.IsNullOrEmpty(tag))) + string defaultTags = ConfigurationManager.AppSettings["Exceptionless:DefaultTags"]; + if (!String.IsNullOrEmpty(defaultTags)) + foreach (var tag in defaultTags.SplitAndTrim(',').Where(tag => !String.IsNullOrEmpty(tag))) config.DefaultTags.Add(tag); } #endif