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

Custom Business Transaction is not working

Hany.Elkhadragy
Wanderer

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

5 REPLIES 5

Mario.Morelli
Architect

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

 

 



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A

Hi Mario,

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

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



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A

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 

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



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Learn more about me in the Community Member Spotlight Q & A