Discussion Feed
01-21-2020
10:12 AM
2 Kudos
Hi Bojan, Your setup doesn't need microservices licensing, as you are using full Windows OS. This statement applies to your situation: "Instrument an unlimited number of CLRs on a single Windows OS instance; snapshots are retained for 14 days unless archived". Sorry for confusion. Cheers, -Alex
... View more
11-22-2019
03:25 PM
2 Kudos
Support for .NET Core 3.0 on Windows is now GA included with .NET Agent 4.5.17! Sorry for delay, it took a little longer than anticipated. -Alex
... View more
11-22-2019
10:09 AM
2 Kudos
Table of Contents
Overview
Dockerfile snippet
How to use the Dockerfile
Special instructions for Alpine users
Overview
AppDynamics .NET Agent for Linux supports monitoring .NET Core 2.x and 3.0 applications, and it is becoming more and more popular with customers who use containers to run their applications.
There are several ways to deploy the agent after you download it from https://download.appdynamics.com/ . You can include agent files in the Docker file, load them from a sidecar container or share them on a separate volume.
Even though there’s this flexibility of use, we’ve been looking at options to simplify the agent deployment and configuration!
The idea that drove this effort is simple:
Simplify agent download, installation and configuration altogether using Dockerfile features like multi-state builds ( https://docs.docker.com/develop/develop-images/multistage-build/ )
Obtain agent from the portal using new download API ( https://docs.appdynamics.com/display/LATEST/Download+AppDynamics+Software )
Prepare agent binaries and copy them to target container
Configure all required agent properties based on documentation ( https://docs.appdynamics.com/display/LATEST/Install+the+.NET+Agent+for+Linux )
Dockerfile snippet
Here is the snippet of a Dockerfile that does all that!
# Download AppDynamics agent during multi-stage docker build
# Insert this portion at the top of your Dockerfile
FROM mcr.microsoft.com/powershell as APPDTOOL
WORKDIR /agent
SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
# !!!Important: Replace user name and password with proper identify at accounts.appdynamics.com
RUN $user = "<user name for AppDynamics account>"; \
$pwd = "<password for AppDynamics account>"; \
$request = [string]::Format("{{""username"": ""{0}"",""password"": ""{1}"",""scopes"": [""download""]}}", $user, $pwd); \
$token = Invoke-WebRequest -Method POST -Body $request -Uri https://identity.msrv.saas.appdynamics.com/v2.0/oauth/token | ConvertFrom-Json; \
$agents = Invoke-WebRequest -Uri https://download.appdynamics.com/download/downloadfilelatest/ | ConvertFrom-Json; \
$agent = $agents | where { $_.filetype -eq "dotnet-core" -and $_.os -eq "linux" }; \
Invoke-WebRequest -Authentication Bearer -Token (ConvertTo-SecureString -AsPlainText -Force $token.access_token) -Uri $agent.download_path -OutFile agent.zip; \
Expand-Archive ./agent.zip ./files
# Your existing Dockerfile logic needs to be put in here
# ==== BEGIN ===
# ===== END ====
# Insert this line at the end of your existing Dockerfile to copy agent files to an application container
COPY --from=APPDTOOL /agent/files /opt/appdynamics/dotnet
# Mandatory settings required to enable the agent for .NET Core application
ENV CORECLR_PROFILER={57e1aa68-2229-41aa-9931-a6e93bbc64d8} \
CORECLR_ENABLE_PROFILING=1 \
CORECLR_PROFILER_PATH=/opt/appdynamics/dotnet/libappdprofiler.so
# Configure connection to the AppDynamics controller
ENV APPDYNAMICS_CONTROLLER_HOST_NAME=controller.saas.appdynamics.com
ENV APPDYNAMICS_CONTROLLER_PORT=443
ENV APPDYNAMICS_CONTROLLER_SSL_ENABLED=true
ENV APPDYNAMICS_AGENT_ACCOUNT_NAME=account-name
ENV APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY="access-key"
# Configure application identity in AppDynamics
ENV APPDYNAMICS_AGENT_APPLICATION_NAME="My Application"
ENV APPDYNAMICS_AGENT_TIER_NAME="Sample Tier"
ENV APPDYNAMICS_AGENT_REUSE_NODE_NAME=true
ENV APPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX="Instance"
How to use the Dockerfile snippet
Dockerfile contains two parts: check the comments to see how to properly insert those into your existing Docker file.
On top of the Dockerfile: insert correct credentials for the account that will be used to pull down the agent from the download portal (this an account at www.appdynamics.com , not the SaaS controller user name). You can also create a custom user that will be used just for download purposes.
At the bottom of the Dockerfile: make sure to include the SaaS controller details and application and tier names.
Special instructions for Alpine users
To get the correct Agent binaries, you will need to update OS match condition to new value "alpine-linux" In the script to get correct agent binaries.
Specify library path on Alpine containers by adding one more line to the bottom: ENV LD_LIBRARY_PATH=/opt/appdynamics/ dotnet
This is the first version of this Dockerfile — I’m looking to mature it over time.
So, please, share your feedback, suggestions, and issues with me!
Regards,
-Alex
... View more
11-05-2019
08:58 AM
2 Kudos
We have just released .NET Core 3.0 support on Linux last week, agent version 4.5.16.1. Working on final steps to extend it to Windows very soon. Unfortunately I am not allowed to share public date, but the work is in the final stages. -Alex
... View more
09-05-2019
12:08 PM
1 Kudo
That makes sense. It won't work using current agents, but we already know what needs to be fixed.
... View more
09-05-2019
12:00 PM
2 Kudos
Hi Nick,
Team has been working on .NET Core 3.0 for the last several months.
Most of the agent features are working already, just a couple of items still in progress.
Stay tuned, I plan to update field once we are close to official GA!
Are you interested in using .NET Core 3.0 on Linux or Windows OS or both?
-Alex
... View more
04-05-2019
03:24 PM
04-05-2019
03:24 PM
Can you attach some screenshots of configuration and what you see in snapshots?
I suspect if you see [...], that means that the method you instrumented might be called multiple times per transaction.
You don't need ToString(), agent does it internally anyway to serialized non-string types.
... View more
04-04-2019
12:05 PM
04-04-2019
12:05 PM
Do you have a way to try these?
I think following should just work:
1. private bool SendBulkOrders(List<Order> orders) {}
DataCollector for method SendBulkOrders collecting Parameter 0.
Getter chain: [0]. BucketId
(If you have a class which has a property type of List, then you would need to do something like "MyProperty.[0].BucketId")
2. private bool SendObject(Object sender) {}
Again,DataCollector for method SendObject collecting Parameter 0.
Getter chain: EmpId
Internally agent should be aware of the runtime type of the parameter, therefore I don't think you need to cast it in the getter chain.
Let me know if this doesn't work, I'll look up further.
Thanks,
-Alex
PS: If you leave the medhod body empty, .NET may optimize your method... in that case it is a good idea to add couple attributes like explained here: https://stackoverflow.com/questions/38632939/disable-compiler-optimisation-for-a-specific-function-or-block-of-code-c
... View more
04-04-2019
08:47 AM
04-04-2019
08:47 AM
For .NET properties, you can just use the property name and the agent will automatically use the get internally: ClOrdID
... View more
Latest Activity
- Got a Kudo for A new way to install .NET Agent into Docker containers. 04-22-2020 09:19 AM
- Got a Kudo for Re: .net microservices license count for Windows host post-app deployment. 01-28-2020 05:22 PM
- Got a Kudo for Re: .net microservices license count for Windows host post-app deployment. 01-22-2020 08:37 AM
- Posted Re: .net microservices license count for Windows host post-app deployment on Licensing (including Trial). 01-21-2020 10:12 AM
- Got a Kudo for Re: Support for .net core 3.0. 11-25-2019 06:31 AM
- Got a Kudo for Re: Support for .net core 3.0. 11-22-2019 04:00 PM
- Got a Kudo for A new way to install .NET Agent into Docker containers. 11-22-2019 03:30 PM
- Posted Re: Support for .net core 3.0 on NET (Agent, Installation). 11-22-2019 03:25 PM
- Posted A new way to install .NET Agent into Docker containers on NET (Agent, Installation). 11-22-2019 10:09 AM
- Got a Kudo for Re: Support for .net core 3.0. 11-05-2019 10:38 PM
- Got a Kudo for Re: Support for .net core 3.0. 11-05-2019 01:29 PM
- Posted Re: Support for .net core 3.0 on NET (Agent, Installation). 11-05-2019 08:58 AM
- Got a Kudo for Re: Support for .net core 3.0. 09-05-2019 02:05 PM
- Got a Kudo for Re: Support for .net core 3.0. 09-05-2019 12:09 PM
- Posted Re: Support for .net core 3.0 on NET (Agent, Installation). 09-05-2019 12:08 PM
- Got a Kudo for Re: Support for .net core 3.0. 09-05-2019 12:06 PM
- Posted Re: Support for .net core 3.0 on NET (Agent, Installation). 09-05-2019 12:00 PM
- Posted Re: Getter Chain on Java (Java Agent, Installation, JVM, and Controller Installation). 04-05-2019 03:24 PM
- Posted Re: Getter Chain on Java (Java Agent, Installation, JVM, and Controller Installation). 04-04-2019 12:05 PM
- Posted Re: Getter Chain on Java (Java Agent, Installation, JVM, and Controller Installation). 04-04-2019 08:47 AM
Community Stats
Date Registered | 12-20-2012 11:59 AM |
Date Last Visited | 01-24-2020 04:26 PM |
Total Messages Posted | 14 |
Total Kudos Received | 11 |