AppD Archive

POJO Transaction Splitting getter chain parameters

CommunityUser
Splunk Employee
Splunk Employee

I am trying to split transactions based on specific content in a method's string parameter, but can't seem to get the getter chains to work the way I want it to.

The entry method signature is like this: invoke(String x).  The content of x is typically something like this: <msg>NEW</msg>

If I configure the Getter Chain to be toString() then the string correctly appends to the Transaction name (i.e. TXN-<msg>NEW</msg>)

But if I configure the Getter Chain to be toString().indexOf("NEW"), it ends up always returning -1 which means it's not found.  I am expecting it to return 5 so that the transaction name resolves to TXN-5.  

Is there a way this can be done or am I misusing getter chains here?

Tags (1)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

I found the answer to my question.  When passing String parameters in the Getter Chain, we don't need to include quotes.  So instead of toString().indexOf("NEW")  we should use toString().indexOf(NEW) 

There are other caveats too.  I found the answer in the documentation here:

https://docs.appdynamics.com/display/PRO41/Getter+Chains+in+Java+Configurations

0 Karma
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!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...