04 Jan 2022 03:09 PM - last edited on 04 Jan 2022 03:45 PM by MaciejNeumann
Hi All,
I would like to create request attribute on services requests which content a JSON payload.
Is it possible to do that on Dynatrace in the meanwhile?
Thank you in advance!
Best Regards,
Solved! Go to Solution.
05 Jan 2022 06:58 AM
Hi @sbokhari ,
Basically you can create request attribute on any string method parameter or utilize a toSting() method to convert that to string but be aware that request attributes are limited in their length. Do you need the whole payload or just parts of it? Usually I'm focusing on key parmeters.
Gil.
05 Jan 2022 10:11 AM
Hi @sbokhari,
Another point to keep in mind, is that request attributes can only be created from certain data sources. If I understand your question correctly, you are trying to extract the JSON payload from a web service request, which is not possible. It is possible to extract JSON from something like JWT contained in a x-jwt-assertion header, but then Gil's warnings regarding the captured string length would also apply. I suppose the processing overhead to examine the payload of web service requests would be too much and would impact performance. A better option would be to try and extract the JSON content not on the web service request itself, but from a method parameter that uses it later.
Hope this helps,
Derick