23 Sep 2020 12:59 PM
Hello,
Just to make sure I understand:
To use a getter in retrieving attribute data, is has to exists in the the class to start with?
and
Using This means you get the "start" value of the getter, and using return option will give you the "end" value?
KR Henk
Solved! Go to Solution.
24 Sep 2020 07:01 PM
Yes, it is true that the method (accessor) you enter there does have to exist. Dynatrace is actually executing that method has part of the process of getting the value - so make sure it truly does only return a value and doesn't actually alter the state of the application.
"This" can be used if you want to access some property or variable of that method the request attribute is configured on. Return value works on the object that is returned by the method. Some details here:
https://www.dynatrace.com/support/help/shortlink/request-attributes-java-dotnet#deep-object-access
24 Sep 2020 08:08 PM
We can capture arguments to a method (input values) or the return value (an output value). If the values are strings, you are done at that point. If they are objects, you can use deep object access to call another x methods to get to the string data.
For example, if you get a UserContext object, you might call getUser() to get the User object and then getUserID() to get the user id as a string.
This would be something like ".getUser().getUserID()" to get that information.