Splunk AppDynamics

Custom Business Transaction is not working

Hany_Elkhadragy
New Member

Hi All,

AppDynamics is able to discover one business transaction end point but this URL is having multiple methods/operations and I need to have metrics for individual operation

For example URL: myserver/service

Operations: query , discovery , activate 

Each operation is having its own payload but same URL

What I want to do is to see myserver/service-query  , myserver/service-discovery   , myserver/service-activate 

image.pngimage.png

Labels (1)
Tags (1)
0 Karma

Morelz
Builder

Hi Hany

Is the operations values(query , discovery , activate ) available within the headers, parameters or cookies? If so, you can create a new transaction detection rule and use the option - Split transactions using Request data), very simple, this will then create separate transactions depending on the Unique Header, Cookie, parameter Value.

If the values are only available within the payload of the request, you can also create a new servlet transaction detection rule and use one of the options available under the section - Split transactions using payload, whichever works best for you

Ciao

0 Karma

Hany_Elkhadragy
New Member

Hi Mario,

Operation name and value is part of payload body section.
Can you share more details with steps

0 Karma

Morelz
Builder

Hi Hany

I will explain one we did recently, by using the Split request using Payload, using the Pojo Method Split Mechanism

Within your code, it will obviously go through several classes & methods to process each request.

We checked and found that their was the following

Class - com.ecom.requests, that had this Method - waitForReply(com.ecom.task)

What the above means is that the initial class's method has another class as an input parameter called com.ecom.task

When we had a look at the com.ecom.task class, we could see it had a method called - getRequest()

We then had a look at this class and method, which we could then see the payload, all you then do is configure the getter chain to extract the operation name out of this method and class and use it in teh configuration.

This will then create a BT per operation

You can also use the JSON Splitting method depending on what frameowrk your application is using

JSON Splitting as below
 
The basis for splitting the transaction here is the content of a JSON string unmarshalled using org.json.JSONObject framework. The string (i.e. object.toString()) return value of getString(String key) or get(String key) method of JSONObject is appended to the transaction name. The actual name of the key must be used in the rule definition.

For example if the code has an expression jsonObject.getString("customerType") or jsonObject.get("customerType") then customerType should be entered as input.

If your code uses other JSON frameworks like GSON and XStream JSON you may use POJO tab for rule definition.

Hope this makes sense

Hany_Elkhadragy
New Member

Thanks Mario for your feedback. but in this case I should have source code of my application or get a help from the developer.

As for me, I'm just managing this system and I don't have visibility to the code.

Is there a way to get such kind of class structure and pick correct class name from AppDynamics agent logs 

0 Karma

Morelz
Builder

Hi Hany

As it's a Java Application, you can do the following

1. Look through the business transaction stack trace, use a full snapshot

2. See where there is a possible class/method that might hold the data for the payload

3. Use the Live preview option to check how the class and method are called and see if there is an option to use an input to one of the classes.

That's how we normally do it, if the developers are not available or can't assist

Ciao

Get Updates on the Splunk Community!

SOC Modernization: How Automation and Splunk SOAR are Shaping the Next-Gen Security ...

Security automation is no longer a luxury but a necessity. Join us to learn how Splunk ES and SOAR empower ...

Ask It, Fix It: Faster Investigations with AI Assistant in Observability Cloud

  Join us in this Tech Talk and learn about the recently launched AI Assistant in Observability Cloud. With ...

Index This | How many sides does a circle have?

  March 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this ...