# APM .net agent see the Service Name in the logs for correlated transactions

**URL:** <https://discuss.elastic.co/t/apm-net-agent-see-the-service-name-in-the-logs-for-correlated-transactions/311137>\
**Category:** APM\
**Tags:** docker, dotnet, language-clients\
**Created:** [August 1, 2022, 3:39pm UTC](https://discuss.elastic.co/t/apm-net-agent-see-the-service-name-in-the-logs-for-correlated-transactions/311137 "2022-08-01T15:39:55Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![Wolfgang\_Ziegler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfgang_ziegler/32/109929_2.png) [@Wolfgang\_Ziegler](https://discuss.elastic.co/u/Wolfgang_Ziegler)\
**Post date:** [August 31, 2022, 3:53pm UTC](https://discuss.elastic.co/t/apm-net-agent-see-the-service-name-in-the-logs-for-correlated-transactions/311137/13 "2022-08-31T15:53:16Z")

</div>

Hi @Nicolas_Rey ,

I looked into this again and applied the solution I found here: [Outputting service.name instead of / alongside context.service.name](https://discuss.elastic.co/t/outputting-service-name-instead-of-alongside-context-service-name/169088)

With that, you can create an alias for the field you already have `metadata.service.name` to `service.name`.

I tested this with my sample application and it looks promising:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/4/34f1a9b86dfac226026ddc180f7353ece3eff553.png)

(_note_: I aliased from `fields.service.name` to `service.name`)

Maybe @Martijn_Laarman has a better solution but this is the workaround I can suggest at the moment.

Cheers,  
Wolfgang

---

_[View the full topic](https://discuss.elastic.co/t/apm-net-agent-see-the-service-name-in-the-logs-for-correlated-transactions/311137)._
