Closed Danthar closed 3 years ago
I am unable to repro this locally (name comes across correctly) - do you have anything in your web.config
when this happens? I'm not sure what combination triggers your case here but would like to fix it!
I'll provide some snippets this week.
Op zo 27 okt. 2019 15:17 schreef Nick Craver notifications@github.com:
I am unable to repro this locally (name comes across correctly) - do you have anything in your web.config when this happens? I'm not sure what combination triggers your case here but would like to fix it!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NickCraver/StackExchange.Exceptional/issues/168?email_source=notifications&email_token=AAHQ3FY2KZYSV5T5FSUAA5LQQWPIVA5CNFSM4HOIKARKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECK7NGI#issuecomment-546698905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHQ3F6XGQX7DJJFGG642K3QQWPIVANCNFSM4HOIKARA .
We have absolutely no exceptional config in our web.config. Except for the modules:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="ErrorStore" type="StackExchange.Exceptional.ExceptionalModule, StackExchange.Exceptional"/>
<add name="ContainerDisposal" type="Autofac.Integration.Web.ContainerDisposalModule, Autofac.Integration.Web" preCondition="managedHandler"/>
<remove name="ApplicationInsightsWebTracking"/>
<remove name="TelemetryCorrelationHttpModule"/>
<add name="TelemetryCorrelationHttpModule"
type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="managedHandler"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
preCondition="managedHandler"/>
<add name="AttributedInjection" type="Autofac.Integration.Web.Forms.AttributedInjectionModule, Autofac.Integration.Web"/>
</modules>
So there is some gore there. But nothing that i would expect to be an issue.
Then in our routing config we have this:
routes.MapRoute("Exceptional", "Exceptions/{*resource}", new { controller = "Admin", action= "Exceptions" });
The Admin controller contains nothing more then this:
public Task Exceptions() => ExceptionalModule.HandleRequestAsync(System.Web.HttpContext.Current);
Addendum. I thought that maybe we simply call the Exceptional.Configure
method to late. But thats not it either. Its being called in the Application_Start of the global.asax
Found it.
var applicationName = "UBER TEST CASE";
Exceptional.Configure(settings =>
{
settings.AppendFullStackTraces = true;
settings.GetCustomData = (exception, data) =>
{
//some custom metrics are added here
};
settings.DefaultStore = new StackExchange.Exceptional.Stores.MemoryErrorStore(new ErrorStoreSettings()
{
ApplicationName = applicationName, //<-- ZE SETTING, IT DOES NOTHING
RollupPeriod = TimeSpan.FromMinutes(30),
Size = 5000
});
settings.DefaultStore.Settings.ApplicationName = applicationName; //<-- ZE SETTING, IT STILL DOES NOTHING
settings.Ignore.Regexes = new HashSet<Regex>()
{
new Regex(@"The client disconnected\.$"),
new Regex(@"Invalid viewstate\.$"), //die viewstate shit
};
});
Exceptional.Settings.Store.ApplicationName = applicationName; // THIS SETTING WORKS
So i don't know if this is user error or not. But i'd expect passing the application name setting in the defaultstore initialisation to work. Afterwards. I was able to reduce setting the DefaultStore thingy to just this:
settings.Store.RollupPeriod = TimeSpan.FromMinutes(30);
settings.Store.Size = 5000;
settings.Store.ApplicationName = applicationName;
And that works just as you would expect. So i guess its user error. But then i wonder, why is the DefaultStore a viable setting in the first place ?
Apologies for not updating here, but this was fixed a while back - we found the initialization order issue by accident when doing something else with Stack Overflow. Now both cases should work :)
Using v2.0.0 im initialising the MemoryErrorStore like so: However the ApplicationName setting is not respecting the log UI still shows "My Application"
Note that this is in an asp.net (netFull) application. And im not using any of the web.config stuff other then the httpmodule initialisation.
Note that using the config setting:
Does work.