# Get a hold of process-group-instance-id within dotnet code

**URL:** <https://community.dynatrace.com/t/get-a-hold-of-process-group-instance-id-within-dotnet-code/37733>\
**Category:** Logs\
**Tags:** log-monitoring-class, oneagent, oneagent-sdk\
**Created:** [December 16, 2022, 3:42pm UTC](https://community.dynatrace.com/t/get-a-hold-of-process-group-instance-id-within-dotnet-code/37733 "2022-12-16T15:42:18Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Bert\_VanderHeyd](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/bert_vanderheyd/32/162_2.png) [@Bert\_VanderHeyd](https://community.dynatrace.com/u/Bert_VanderHeyd)\
**Post date:** [December 16, 2022, 3:42pm UTC](https://community.dynatrace.com/t/get-a-hold-of-process-group-instance-id-within-dotnet-code/37733/1 "2022-12-16T15:42:18Z")

</div>

Is it possible to get a hold of the current process-group-instance-id from within dotnet code itself. We want to add it to some log-to-db system as a field. In a later stage the logs are processed by LogStash and pushed to Dynatrace LM2.0.

The flow already works but with the ID we could link it to the correct entity and management zone.

---

_[View the full topic](https://community.dynatrace.com/t/get-a-hold-of-process-group-instance-id-within-dotnet-code/37733)._
