04 Jan 2022 07:09 AM - last edited on 04 Jan 2022 07:45 AM by MaciejNeumann
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!
Solved! Go to Solution.
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.
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,