Boot up your game to the main menu with the mods and DLCs you plan on using selected, then exit out.
Open: Documents > Paradox Interactive > Crusader Kings II > Logs
Then open the file titled "setup.log" with Notepad ++.
Hit CTRL+F. Select the Mark tab. Check the "Bookmark Line" checkbox. Search for "Trait #".
Go to the Search drop-down menu and select "Remove Unbookmarked Lines" from the "Bookmarks" sub-menu.
This will delete all lines that aren't the Trait ID Numbers, giving you a comprehensive Trait list for all mods you are using.
I'm not sure what would happen if you overwrote this file, so don't do it. Save it as a separate file for reference. These ID's will no longer be right if you change DLC or mods.