# Profiler Auto Instrumentation for .net application

**URL:** <https://discuss.elastic.co/t/profiler-auto-instrumentation-for-net-application/382627>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [October 13, 2025, 10:50am UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-for-net-application/382627 "2025-10-13T10:50:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [October 13, 2025, 10:50am UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-for-net-application/382627/1 "2025-10-13T10:50:42Z")

</div>

Hello Everyone

I have single node ELK cluster running on 8.18 . I want to test APM for that i have sample .net core application running on localhost:5005 . I want to instrument my application without touching the code . I am following below documentation.

[Profiler Auto Intrumentation](https://www.elastic.co/docs/reference/apm/agents/dotnet/setup-auto-instrumentation) and [Zero code change setup](https://www.elastic.co/docs/reference/apm/agents/dotnet/setup-dotnet-net-core#zero-code-change-setup)

I have download the .zip file and extract it in C: drive and set DOTNET\_STARTUP\_HOOKS=C:\elastic\_apm\_profiler\_1.34.1-win-x64\ElasticApmAgentStartupHook.dll . But i am not able to see my application in kibana Observability

---

<div class="post-metadata">

**Author:** ![Aniket\_Pant](https://avatars.discourse-cdn.com/v4/letter/a/77aa72/32.png) [@Aniket\_Pant](https://discuss.elastic.co/u/Aniket_Pant)\
**Post date:** [October 13, 2025, 4:09pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-for-net-application/382627/2 "2025-10-13T16:09:42Z")

</div>

Hello Everyone ,

I am able to instrument my app i.e. on dotnet app . I was setting env variable in cmd and running the command in powershell so my app was not able to capture the env variable.

I resolved by configuring env variable in cmd

```auto
set ELASTIC_APM_SERVER_URL=http://192.168.1.7:8200
set ELASTIC_APM_SECRET_TOKEN=Wm8ENthMVqcCti1Voh8uz2Pi
set ELASTIC_APM_SERVICE_NAME=DOT_NET_APP

```

then i run the command `dotnet run` in same cmd shell. In the final i got the desired result.
