Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

.Net core 2.2 garbage collection metric support


The DotNet Core 2.2 release introduced two features that sound rather applicable to Dynatrace. The injecting of code prior to running an application main method via a Startup Hook and that CoreCLR events can now be consumed using the EventListener class. These events describe the behavior of GC, JIT, ThreadPool, and interop( same events that are exposed as part of the CoreCLR ETW provider on Windows).

Is there any intention to support the GC data collection for DotNet Core 2.2 on LInux?

Dynatrace Advisor
Dynatrace Advisor

Yes. We are actively working on leveraging the runtime events to generate more metrics (also on Linux) for .NET.

That being said, today we're already using a combination of ETW (only Windows) and Profiling API callbacks to calculate GC and JIT metrics. We've just added .NET Thread Pool Metrics (released with OneAgent 1.165). These metrics will also be available on Linux.

We're also playing with ideas on improving our existing GC metrics. E.g. Show garbage collection times not only per generation, but also per "reason" (e.g. "Small object heap allocation", "Large object heap allocation", "Out of space (for large object heap)", "Induced", ...) and per "type" (e.g. "blocking" vs. "background").

What's your opinion on that? In an ideal world, which CLR metrics would you like to see in Dynatrace?


Hi @Christoph N., we have a lot of .NET Core 2.1 services running both on Windows and Linux, but we are actively working to migrate all our backend to Linux. We are wondering which are the current limitations of the oneagent for this OS with .NET Core and if there's an ETA for the updates that you mentioned. Thanks!

Well, the only limitation we currently have on Linux are GC Metrics (except for Suspension Time, which we should also be able to deliver on Linux). Otherwise everything works out of the box (including automatic docker injection).

Can't give an ETA on GC Metrics for Linux. One thing I can share is, that we're probably only going to be able to do those in .NET Core 3.0+, since there are CLR bugs in 2.2 preventing us from using it (GC Start/End calls don't come reliably in every GC mode).