cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setup OneAgent on Containers (.NET 8)

jacoblom
Newcomer

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)

jacoblom_0-1711297302204.png

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,

1 REPLY 1

jacoblom
Newcomer

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

Featured Posts