24 Mar 2024 04:05 PM - last edited on 25 Mar 2024 08:49 AM by MaciejNeumann
Hi there,
I'm trying to following the following: Set up OneAgent on containers for application-only monitoring
# The aspnet version to use (8.0)
ARG VERSION=8.0
FROM <PRIVATE-CONTAINER-REGISTRY>/aspnet-core:$VERSION AS aspnet_core
EXPOSE 8080
EXPOSE 8081
USER dotnet
FROM aspnet_core AS release
#ENV DT_HOME=/opt/dynatrace/oneagent
COPY --from=<DT_TENANT>.live.dynatrace.com/linux/oneagent-codemodules:dotnet / /
WORKDIR /app
ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so
COPY ./app .
USER dotnet
ENTRYPOINT [ "/opt/dynatrace/oneagent/dynatrace-agent64.sh" ]
CMD [ "dotnet", "DTImage.dll" ]
When I build and run the docker image, the only output I'm seeing is:
2024-03-24 17:57:41 Info: Using DT_HOME: /opt/dynatrace/oneagent
If I comment ENTRYPOINT [ "/opt/dynatrace/oneagent/dynatrace-agent64.sh" ] and ENV LD_PRELOAD /opt/dynatrace/oneagent/agent/lib64/liboneagentproc.so, all works fine.
It's a very simple app (default weather forecast)
I'm expecting the same behaviour when doing the setting the entrypoint to the dynatrace-agent64.sh, as well as setting the LD_PRELOAD ENV
Are there any known issues, or, can someone suggest something I should do differently?
Thank you,
24 Mar 2024 05:10 PM
Seems like the issue is only prevalent to .NET 8.
All works fine for .NET 6
Unless there's someone that can advise otherwise?
Regards
05 Sep 2024 08:34 PM
Hi, Any updates on your issue?
05 Sep 2024 09:56 PM
We noticed that removing the ENV COMPlus_EnableDiagnostics=0 from the Dockerfile, fixed the problem.