You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the code from the quick start in my service, I receive the following TypeInitializationException:
System.TypeInitializationException: The type initializer for 'Metrics.MetricsErrorHandler' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Metrics.MetricsErrorHandler..cctor()
--- End of inner exception stack trace ---
at Metrics.MetricsErrorHandler.get_Handler()
at Metrics.PerfCounters.PerformanceCounters.Register(MetricsContext context, String name, Unit unit, String category, String counter, String instance, Func`2 derivate, MetricTags tags)
at Metrics.PerfCounters.PerformanceCounters.RegisterSystemCounters(MetricsContext context)
at Metrics.PerformanceCountersConfigExtensions.<>c__DisplayClass3_0.<WithSystemCounters>b__0(MetricsContext ctx, Func`1 hs)
at Metrics.MetricsConfig.<>c__DisplayClass18_0.<WithConfigExtension>b__0(MetricsContext m, Func`1 h)
at Metrics.MetricsConfig.WithConfigExtension[T](Func`3 extension, Func`1 defaultValueProvider)
at Metrics.MetricsConfig.WithConfigExtension(Action`2 extension)
at Metrics.PerformanceCountersConfigExtensions.WithSystemCounters(MetricsConfig config, String context)
at Metrics.PerformanceCountersConfigExtensions.WithAllCounters(MetricsConfig config, String systemContext, String applicationContext)
In-use code looks like this:
try{
Metric.Config
.WithHttpEndpoint("https://localhost:50000/").WithAllCounters();}catch(Exceptionex){this.Log().Error("Could not start Metrics.NET", ex);}
Using v0.4.8.
The text was updated successfully, but these errors were encountered:
did anyone have any other answer for this rather vague error? I am getting this error occur on one server but not another, can't work out what it is unhappy about!
Using the code from the quick start in my service, I receive the following
TypeInitializationException
:In-use code looks like this:
Using v0.4.8.
The text was updated successfully, but these errors were encountered: