djluck / prometheus-net.DotNetRuntime

Exposes .NET core runtime metrics (GC, JIT, lock contention, thread pool) using the prometheus-net package
MIT License
357 stars 85 forks source link

UnsupportedEventParserRuntimeException with v4.2 #60

Closed kerams closed 3 years ago

kerams commented 3 years ago

Hello, I've just updated from version 4.1 to 4.2 and I'm now seeing the exception above.

It's a .NET 6 project and I'm doing DotNetRuntimeStatsBuilder.Customize().WithThreadPoolStats().WithGcStats().StartCollecting().

Reverting back fixes the problem, but I am frankly not sure if all the metrics are really emitted since the project is in development and there is nothing scraping it yet.

djluck commented 3 years ago

Hey @kerams, thanks for the report- do you mind posting the stack trace?

kerams commented 3 years ago
Startup: Prometheus.DotNetRuntime.UnsupportedEventParserRuntimeException: False
   at Prometheus.DotNetRuntime.ListenerRegistration.Create[T](CaptureLevel level, Func`2 factory) in prometheus-net.DotNetRuntime.dll:token 0x6000021+0x5f
   at Prometheus.DotNetRuntime.DotNetRuntimeStatsBuilder.Builder..ctor() in prometheus-net.DotNetRuntime.dll:token 0x6000154+0x47
   at Prometheus.DotNetRuntime.DotNetRuntimeStatsBuilder.Customize() in prometheus-net.DotNetRuntime.dll:token 0x6000006+0x0
   at Startup.main(String[] _arg1) in C:\_\Startup.fs:line 432
djluck commented 3 years ago

@kerams this should be fixed in 4.2.1, please let me know if it's not.

kerams commented 3 years ago

All good, much obliged.