13 Mar 2020 07:32 AM
Hi,
we need a value, Where the customer fired a lot from postman. how to set a request attribute.
this data source
Don't know what value to add
code level
request value
Solved! Go to Solution.
13 Mar 2020 08:08 AM
My tip. You've found your class and method and you know which object you want to catch. You should find class that represents this object and check what getter methods are available there. For example getApp_username or something like that. In such case you can use this as deep object access. If you want to catch all of them and you don't have accessor that will return whole object as string, you may not be able to catch all values at once (there can be only one sensor per method, it means that you can access only one value from object). If you will find other methods that are passing the same object, you can instrument them as well to get more values.
Sebastian
13 Mar 2020 08:20 AM
Hi Sebastian K.
Can you suggest which get values should be obtained from the data source from the image?
Thank you
13 Mar 2020 08:42 AM
It seems that you have there only stringlist. It's not full source. If you have stringList inside object it may be problem with extracting values. This is not regular object with accessors but list that contains strings (key : value). In such case you can take values by passing key name to get method. This operation is not allowed in dynatrace. You cannot use any accessor that needs parameter inside. It has to be converted to string in code, you will not be able to to that in DT.
But as client is passing this using postman, you should be able to catch POST variables with data you need? You will not need to instrument code and this should work out of the box.
Sebastian
13 Mar 2020 10:26 AM
Does that mean we can't get the parameters for a data source?
13 Mar 2020 12:32 PM
You will not be able to collect parameters from that code, but you will be able (or should be) catch tam as POST variables. You've presented to me POST Payload from browser, which means you will be able to catch it that way.
Sebastian
16 Mar 2020 07:38 AM
Sorry, I have some questions I didn't make user sessions but wanted to make a request attribute. Will catch tam as POST variables?
thank you
16 Mar 2020 07:45 AM
POST variables are regular request attributes. Change Request attribute source from .NET Methot into post varialble. Then put names of values from payload and should work.
13 Mar 2020 01:26 PM
you can use the request attribute to link data back to a user session and use it as a user session tag. But first you must find where that data is located. for example if you are looking to grab something out of the url we would fill it out like this:
then select that as the tag for the user session within the application
13 Mar 2020 01:33 PM
User sessions does not work for POSTMAN requests 🙂