# Missing Metric Data (gargbage collection in some cases)

**URL:** <https://discuss.elastic.co/t/missing-metric-data-gargbage-collection-in-some-cases/237461>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [June 17, 2020, 11:22am UTC](https://discuss.elastic.co/t/missing-metric-data-gargbage-collection-in-some-cases/237461 "2020-06-17T11:22:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlorianBeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/florianbeck/32/57044_2.png) [@FlorianBeck](https://discuss.elastic.co/u/FlorianBeck)\
**Post date:** [June 17, 2020, 11:22am UTC](https://discuss.elastic.co/t/missing-metric-data-gargbage-collection-in-some-cases/237461/1 "2020-06-17T11:22:15Z")

</div>

I am running Elastic-Stack 7.7.0 with an dotnet APM-Client.

On normal dev workstations we have the all metric-Data about GarbageCollection via the APM-Client. If we deploy this on our Server and run the code with IIS there is no Garbage-Collection Metric.  
It's an [ASP.net](http://ASP.net) core 2.1 Project which runs under .net Full Framework with Ef6.

The configuration of the local dev instance and the server Version is almost the same.

---

<div class="post-metadata">

**Author:** ![GregKalapos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gregkalapos/32/37205_2.png) [@GregKalapos](https://discuss.elastic.co/u/GregKalapos)\
**Post date:** [June 25, 2020, 9:23pm UTC](https://discuss.elastic.co/t/missing-metric-data-gargbage-collection-in-some-cases/237461/2 "2020-06-25T21:23:36Z")

</div>

Hi @FlorianBeck, welcome on discuss 👏

On .NET Full Framework the agent uses ETW through [TraceEvent](https://www.nuget.org/packages/Microsoft.Diagnostics.Tracing.TraceEvent/) to collect GC metrics. One guess I have is that maybe from some reason the agent is unable to create an ETW session in that environment. If this happens the agent prints an error - if you [collect agent logs](https://www.elastic.co/guide/en/apm/agent/dotnet/current/_collecting_agent_logs.html#_asp_net_core) then some error should show up there, which would tell us more.

Maybe temporarily switching the user of the app pool, or [listing all ETW sessions](https://stackoverflow.com/a/50232170/1783306) would be also good steps - the session which is started by the agent should be called `EtwSessionForCLRElasticApm_[SomeGuid]`.

---

<div class="post-metadata">

**Author:** ![FlorianBeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/florianbeck/32/57044_2.png) [@FlorianBeck](https://discuss.elastic.co/u/FlorianBeck)\
**Post date:** [June 27, 2020, 8:05am UTC](https://discuss.elastic.co/t/missing-metric-data-gargbage-collection-in-some-cases/237461/3 "2020-06-27T08:05:34Z")

</div>

Thank you. Indeed the iis User was not in the relevant group to collect these metrics. Would be awesome to give some Information about this on the specific metrics Page.

Also a little bit strange, that at some point, there was an error of less System ressources and no gc collected afterwards. Restart of iis, and some Performance Services did nothing. There was enough RAM and disc space.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 18, 2020, 4:05am UTC](https://discuss.elastic.co/t/missing-metric-data-gargbage-collection-in-some-cases/237461/4 "2020-07-18T04:05:38Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
