question

Igor S. avatar image
Igor S. asked ·

Methdo Argument is an Object Array

Hi all,

I am monitoring an aplication related to spliting a customers bill. There are several business rule that define how the spliting is done and in how many parts the bill is split.

As this application involves several different systems one of the biggest problems is that system A sends a message to system B, but system B on treats part of what it should. Talking to people that maintain this application in production they told where to get the information sent from A to B o system A side. However, it is an array of objects. I have the accessor set up properly, but due to it being an array, AppMon only prints the names of the elements.

Please see below how it is configured:

Method instrumented:

Sensor rule:

I am using the accessor getDescricao(), but this is a method from each of the array elements. Therefore the PurePath shows only the names of the elements:

Does someone has any I idea what could be done? I am trying to get the information somewhere else on the app, but right now it was not possible.

configuration6.5sensorsensors
sensor-rules.png (10.0 KiB)
sensor-rules2.png (64.9 KiB)
sensor-rules3.png (112.5 KiB)
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Joe H. avatar image
Joe H. answered ·

Igor, Another approach to this type of situation is to modify the code and 'expose' the required object/primitive in a dummy method. For example, pass the object to the sendToDynatrace(object); method which does nothing but return. Then you can capture that object and access away. Of course the assumption is that you don't pass an array to sendToDynatrace(). ;)

hth

joe

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Igor S. avatar image
Igor S. answered ·

Yes I had discussed this with the customer. As for now I'll inform them to them about the limitation and if they need to have the information than I'll discuss what could be done to create such a method.

Thank you all for your help.

Regards,

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Igor S. avatar image
Igor S. answered ·

Already did so. There is a get method down the stack that brings what I need, but unfortunately this method returns an array also. I'll inform the customer that this is impossible to get.

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.

Dave M. avatar image
Dave M. answered ·

Hi Igor,

Unfortunately, there is no way to use deep object access on the elements in the array, so I would look for some method further down the call stack that accesses each element and try doing it there.

HTH,

dave

Share
10 |2000000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 50.0 MiB each and 250.0 MiB total.