I'm developing in a windows environment and my application is running in a linux container. Actually, I achieved the instrumentation following the steps posted in this thread by @Kartikay.Tripathi. I only needed to modify a little bit the dockerfile because my application is installed with a framework-dependent way. Now the only issue that I'm facing is the fact that I need to set up the node-name dinamically according to the container hostname, but I found out that there is some environment variables that are capable of doing that. This is the dockerfile that I'm using:
COPY . .
RUN dotnet restore
RUN dotnet build -c Release -o /app
RUN dotnet publish -c Release -o /app
ENV ASPNETCORE_URLS http://*:80
ENTRYPOINT ["dotnet", "MyApplication.dll"]
I'm also using docker-compose to deploy my containers so there is my docker-compose.yml file:
You can notice that the CORECLR_PROFILER_PATH is the one generated after the 'dotnet publish' command. I searched for it inside of the container using the 'find' command and this was the path that I found.
Also, I didn't got some problems installing the AppDynamics nuget package directly from nuget.org, using the VS package manager. The name of the package is AppDynamics.AgentSDK v4.5.2.
Finally, those are the environment variables that can be used to treat the node-name point:
APPDYNAMICS_AGENT_NODE_NAME = <name>
APPDYNAMICS_AGENT_REUSE_NODE_NAME = (true | false)
APPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX = <prefix>
@Kartikay.Tripathi is there any guide where we can check all of the environment variables that are available to use?
Hope it helps,
... View more
Thanks, this was very helpfull and I suggest you to update the official documentation with this guide. It is much better than the original one.
I still have an issue: since my application is running in containers, I have multiple instances of it. This means that I can't simply apply a fixed node-name, it needs to vary according to the container instance so it will be properly visible at appDynamics dashboards.
Any suggestions on how to do that?
... View more