Unless there is data sharing among countries, or if you volunteer that information deliberately or accidentally (for example, by checking in for a flight with the other passport and that data ends up in the advanced passenger information sent to your country of residence), they are unlikely to ever know.
Countries usually care about identity/citizenship — particular instances of travel documents are not that important, as long as they're genuine, because they're only used to confirm your identity and citizenship. Anything written/stamped on a particular travel document can always "disappear" by "losing" that travel document and getting another one, so anything deemed important is also stored in a database which outlives the document.
In the unlikely event that they do care about multiple valid passports, then they will simply ask you explicitly in some form that you have to fill. If they do ask, then you should disclose it because lying in such forms is risky business — if it's a naturalization form, you risk having your citizenship revoked later.