Splunk AppDynamics

Application Agent SDK API - How to use them?

CommunityUser
Splunk Employee
Splunk Employee

Hi all,

 I am trying to customize the application agent to inspect some of the transaction data present in the HTTP Request and stumbled across

https://docs.appdynamics.com/display/PRO42/Add+Custom+Fields+to+Transactions+Using+Java+SDK

I believe this can be achieved using application agent SDK. But there is woefully minimal documentation on this subject. 

Can you please help me on how to extract data from a transaction (in my case a HTTP request) while using SDK and how do we install this with the application agent?

Labels (1)
0 Karma
1 Solution

Peter_Holditch
Builder

Srinirand,

I get the feeling this thread is converging with https://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/HTTP-Request-parameters-of-web..., am I right?

The agent API allows you to add code within your application to influence what data is reported to AppDynamics.  It does not allow you to build "agent plug-ins" that would be injected into the application code at runtime in the current release.

Injecting code to capture HTTP data without impacting the application code would probably be best achieved using a servlet filter, which could be injected into the request flow by the application container.

Warm regards,
Peter.

View solution in original post

0 Karma

Peter_Holditch
Builder

Srinand,

The SDK is part of the agent, so there is no additional install necessary to use its APIs

If you incorporate the code from the sample in the doc page you linked into your application, it should run fine with no need for additional dependencies on the classpath, so long as the agent is loaded into the JVM with -javaagent

Once your application has parsed the HTTP request and has the data you wish to collect in variables, it is a simple matter to add this data to snapshots and/or transaction analytics data using the addSnapshotData API as illustrated.

I hope this helps?

Warm regards,

Peter

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
Thank you Peter.

Is it possible to use these APIs to build a custom data collector and add
the custom code as an application agent plugin?

0 Karma

Peter_Holditch
Builder

Srinirand,

I get the feeling this thread is converging with https://community.appdynamics.com/t5/Java-Java-Agent-Installation-JVM/HTTP-Request-parameters-of-web..., am I right?

The agent API allows you to add code within your application to influence what data is reported to AppDynamics.  It does not allow you to build "agent plug-ins" that would be injected into the application code at runtime in the current release.

Injecting code to capture HTTP data without impacting the application code would probably be best achieved using a servlet filter, which could be injected into the request flow by the application container.

Warm regards,
Peter.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee
You are right Peter.

Was exploring the APIs as an option.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Persistent Queue at TcpOut — One of Splunk's Most Practical Features

Splunk introduced persistent queueing at the tcpout layer as one of the most practical resilience features in ...

Skip the Awkward Silence: Have a .conf-ersation at .conf26

Picture this. You arrive at .conf26 already having your socializing and networking plans mapped out. No ...

Rethinking Zero Trust: From Product Purchases to Logical Control Evidence

Implementing Zero Trust (ZT) across complex environments often falters at the very beginning due to a ...