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

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

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"

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.

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

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
1.22.0 - generate  log
dotnet_138798_95479731.agent.log
elastic_apm_profiler_dotnet_483584_1705338233.log

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 is unsupported on CentOS Linux 7.

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

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

1.23.0 - Don`t working.

Yes running systemd daemon.

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

[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

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