Splunk AppDynamics

POJO instrumentation of superclass methods does not work when the methods are not overridden in the child class

CommunityUser
Splunk Employee
Splunk Employee

Hi,

I've instrumented a POJO rule as:

Match classes "that extend a Super Class that ends with BaseCatalogWorkflowStep" (didn't want to bother with the package prefix, so used ends with, instead of equals)

Method name "equals in"

We have been capturing BTs correctly for all subclasses of BaseCatalogWorkflowStep which override the in() method.

However, for any subclasses where the in() method is not overridden, the BTs aren't captured.

Our application is rather complex, in the sense that we're using IBM proprietary code, that is invoked when certain events are triggered by users. One such event is the in() method of the BaseCatalogWorkflowStep class. Any subclasses which extend the BaseCatalogWorkflowStep class but do not override the in() method, still have the in() method invoked on them, but the code executed is the one from the parent class.

Is there any way, besides ovderriding the in() method and just calling super.in(), that we can capture BTs in this scenario?

I've attached screenshots of the POJO rule, of a class definition that is captured and of a class definition that is not captured.

image.jpegPOJO ruleimage.jpegClass definition which is NOT capturedimage.jpegClass definition which is captured

Labels (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi @Anonymous

A colleague of mine suggested that you might succeed if you use the  “class equals” rule instead of extends.

Let us know if the suggestion works for you. 

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Radhika,

Thanks for your answer.

I've tried your suggestion, but transactions were still not being detected.

In the end, I've succeeded in capturing the transactions by using the "class which implements an interface equal to" condition. So I've ended up having both rules running, with different priorities. If the first rule ("class that extends a class equal to") doesn't detect the transaction, the 2nd rule ("class that implements an interface equal to") will.

Still not sure why the "extends" rule wasn't working.

The ticket can be closed, thank you.

Regards,

Radu

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Maximizing the Value of Splunk ES 8.x

Splunk Enterprise Security (ES) continues to be a leader in the Gartner Magic Quadrant, reflecting its pivotal ...