# Profiler Auto instrumentation not working after update c# agent to version 1.25.3

**URL:** <https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106>\
**Category:** APM\
**Tags:** dotnet\
**Created:** [January 15, 2024, 6:55pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106 "2024-01-15T18:55:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![vahe](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vahe](https://discuss.elastic.co/u/vahe)\
**Post date:** [January 15, 2024, 6:55pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/1 "2024-01-15T18:55:31Z")

</div>

Hello.  
Please help me. Profiler Auto instrumentation stopped working after update agent to version 1.25.3.

Agent version 1.22.0 working fine.

Elastic version 8.11.4  
Fleet 8.11.4  
APM Server 8.11.4  
Linux CentOS Linux release 8.5.2111

```auto
dotnet --list-runtimes
Microsoft.AspNetCore.App 5.0.17 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

Configuration in systemd

Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

Environment=ELASTIC_APM_ENABLED=true
Environment=ELASTIC_APM_SECRET_TOKEN=" *************"
Environment=ELASTIC_APM_SERVER_URL="http://localhost:8200"
Environment=ELASTIC_APM_SERVICE_NAME="ServiceName"
Environment=ELASTIC_APM_ENVIRONMENT="Production"
Environment=ELASTIC_APM_CENTRAL_CONFIG=true

Environment=CORECLR_ENABLE_PROFILING=1
Environment=CORECLR_PROFILER={FA65FE15-F085-4681-9B20-95E04F6C03CC}
Environment=CORECLR_PROFILER_PATH="/data/deploy/elastic-service/profiler/libelastic_apm_profiler.so"
Environment=ELASTIC_APM_PROFILER_HOME="/data/deploy/elastic-service/profiler"
Environment=ELASTIC_APM_PROFILER_INTEGRATIONS="/data/deploy/elastic-service/integrations.yml"
Environment=ELASTIC_APM_PROFILER_EXCLUDE_INTEGRATIONS="Kafka;MySqlCommand;NpgsqlCommand;OracleCommand;RabbitMQ"
Environment=ELASTIC_APM_PROFILER_LOG="info"
Environment=ELASTIC_APM_PROFILER_LOG_DIR="/data/deploy/elastic-service/logs"

```

---

<div class="post-metadata">

**Author:** ![stevejgordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevejgordon/32/80912_2.png) [@stevejgordon](https://discuss.elastic.co/u/stevejgordon)\
**Post date:** [January 16, 2024, 2:32pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/2 "2024-01-16T14:32:48Z")

</div>

Hi @vahe.

Are logs generated in your configured log directory `/data/deploy/elastic-service/logs`? There should be several with `profiler` in the name, which are created when you run the .NET application. Those might give us a clue as to what's preventing the profiler from attaching.

---

<div class="post-metadata">

**Author:** ![vahe](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vahe](https://discuss.elastic.co/u/vahe)\
**Post date:** [January 16, 2024, 2:52pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/3 "2024-01-16T14:52:39Z")

</div>

No logs generated 1.25.3, I checked, after agent version 1.22 version profiling do not work.

```auto
Maybe it's libelastic_apm_profiler.so? They differ in size
1.22 - 3352152 libelastic_apm_profiler.so
1.25.3 - 3379816 libelastic_apm_profiler.so

```

```auto
1.22.0 - generate log
dotnet_138798_95479731.agent.log
elastic_apm_profiler_dotnet_483584_1705338233.log

```

---

<div class="post-metadata">

**Author:** ![stevejgordon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stevejgordon/32/80912_2.png) [@stevejgordon](https://discuss.elastic.co/u/stevejgordon)\
**Post date:** [January 16, 2024, 4:08pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/4 "2024-01-16T16:08:42Z")

</div>

Thanks. The absence of logs suggests .NET is not even picking up the profiler or the profiler failing super early. We'll need to open an issue to investigate this on our end.

Are you using .NET 7 for the app target? Is your app running and a systemd daemon?

Note that .NET [does not support](https://learn.microsoft.com/en-us/dotnet/core/install/linux-centos) is unsupported on CentOS Linux 7.

---

<div class="post-metadata">

**Author:** ![Martijn\_Laarman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_laarman/32/4410_2.png) [@Martijn\_Laarman](https://discuss.elastic.co/u/Martijn_Laarman)\
**Post date:** [January 16, 2024, 4:20pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/5 "2024-01-16T16:20:31Z")

</div>

Is `1.22.0` your lowest working version? Does `1.23.0` fair better?

---

<div class="post-metadata">

**Author:** ![vahe](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vahe](https://discuss.elastic.co/u/vahe)\
**Post date:** [January 16, 2024, 4:31pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/6 "2024-01-16T16:31:26Z")

</div>

CentOS Linux release 8.5.2111  
Target app - .Net 5, .NET 6 and NET 7. All dont working.

---

<div class="post-metadata">

**Author:** ![vahe](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vahe](https://discuss.elastic.co/u/vahe)\
**Post date:** [January 16, 2024, 4:32pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/7 "2024-01-16T16:32:16Z")

</div>

1.23.0 - Don`t working.

---

<div class="post-metadata">

**Author:** ![vahe](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vahe](https://discuss.elastic.co/u/vahe)\
**Post date:** [January 16, 2024, 4:33pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/8 "2024-01-16T16:33:53Z")

</div>

Yes running systemd daemon.

---

<div class="post-metadata">

**Author:** ![vahe](https://avatars.discourse-cdn.com/v4/letter/v/4bbf92/32.png) [@vahe](https://discuss.elastic.co/u/vahe)\
**Post date:** [January 17, 2024, 1:04pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/9 "2024-01-17T13:04:21Z")

</div>

For the sake of experimentation, I moved libelastic\_apm\_profiler.so from 1.22.0 to 1.25.5.  
I received this error/warn in the log

```auto
[2024-01-17T16:48:21.388417906+04:00] [WARN] AssemblyLoadFinished: Elastic.Apm.Profiler.Managed 1.25.0.0 did not match profiler version 1.22.0.0. Will not be marked as loaded

```

---

<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:** [February 14, 2024, 1:04pm UTC](https://discuss.elastic.co/t/profiler-auto-instrumentation-not-working-after-update-c-agent-to-version-1-25-3/351106/10 "2024-02-14T13:04:47Z")

</div>

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