<logger name="puppetlabs.ring-middleware.core" level="trace"/>
2016-12-21 13:21:08,327 TRACE [qtp993744537-38] [p.r.core] Computed response: {:status 200, :headers {Content-Type text/pson, X-Puppet-Version 4.8.1}, :body {"tags":["settings"...
I don't think there's any way to register the TeeFilter without making changes to the library, trapperkeeper-webserver-jetty9, that Puppet Server uses to integrate the Jetty web server. If you just wanted to get the response body but didn't need the full request body, you could turn on "trace" level logging for the "puppetlabs.ring-middleware.core" namespace in the /etc/puppetlabs/puppetserver/logback.xml file:<logger name="puppetlabs.ring-middleware.core" level="trace"/>
With that in place you'd see the response body appear in the /etc/puppetlabs/puppetserver/puppetserver.log file, like this:2016-12-21 13:21:08,327 TRACE [qtp993744537-38] [p.r.core] Computed response: {:status 200, :headers {Content-Type text/pson, X-Puppet-Version 4.8.1}, :body {"tags":["settings"...I think we could add some functionality to the trapperkeeper-webserver-jetty9 library to enable integration with the logback TeeFilter. If you are interested in pursuing this further, would you mind submitting a request for this in a SERVER or TK project ticket at https://tickets.puppetlabs.com?
Ah, Gatling is a great tool to use not only for capturing request content but also for replaying the captured content under arbitrarily simulated load to a target server. As evidenced from what is in the gatling-puppet-load-test repo that you found, we use Gatling pretty heavily in our own internal load testing and have been very pleased with it. If you want to get into parameterizing the captured payload, e.g., to introduce some variation in playback of a captured recording to put more stress on the server, it does come with a bit of a learning curve with Scala, etc. as you mentioned.
If you were interested in just doing a one-off capture of an agent run against a master so that you can grab the POST params in an agent’s catalog request, you could also try a puppet agent run with the --http_debug flag. For example, if you were to run the following…
puppet agent -t --http_debug… then you should see something like the following in the console output:
<- "POST /puppet/v3/catalog/localhost?environment=production HTTP/1.1\r\nAccept: pson, dot, binary\r\nX-Puppet-Version: 4.8.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nUser-Agent: Ruby\r\nHost: localhost:8140\r\nContent-Length: 20809\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n"
<- "environment=production&facts_format=pson&facts=%257B%2522name%2522%253A%2522localhost%2522...