PCIe DIY protocol analyzer / packet spy / monitor - project
Well I see a 1.0 x4 analyzer for $1500 on eBay and I know I've seen the pcie card versions come up even cheaper.  Seeing as how all cards must be able to fall back to 1.0 I'd think this would meet the requirement for a hobbiest, or at least this would set a cost starting point for you.

Now if you want to do it yourself I would guess an fpga would be the way to go.   I don't remember seeing and pcie cards with both an edge connector and a pcie slot but you can probably get one that has an edge connector and high speed expansion bus and you could make a board to convert that to a pcie connector.

You'll probably want some ram and maybe some SRAM on there as well to store your packet captures.  Then I'd think you have to write some rtl to either make your fpga look like a switch to the rot complex.  Then you monitor and store some traffic in both directions.

Oh and the most useful thing about the analyzer is the triggers so when you spec it out you should think about some trigger and filter logic to add like only capture tlp packets in this address range.

This is a lot of work vs $1500, on the other hand our 3.0 x16 analyzer was $250k so if you need something in that range that's specific to your product it could be worth it.