Spy parses the combat log for actions performed by enemy players.
Apply a conditional filter to the events sent to combat log. Do not send the events to combat log about enemy players unless you’re in combat with them.
Apply this filter to all the events player receives about enemy players.
Algorithm of determining if you’re in combat with someone isn’t that hard too. I guess you already have it implemented in many places (for example when system decides whether you should be granted honorable kill or not, simply without level check).
From a developer point of view I don’t see anything impossible here.
EDIT1: I see many people here are afraid that it would break other addons. Some even afraid that it would break PvE addons (deatails, dbm, etc.)
I do not suggest to disable all the events and all the logs.
I specifically said “about enemy players”. And only if you’re not in combat with them.
It’s all a matter of implemented CONDITION (aka filter).
It’s possible to use common sense here and implement it the way that any interactions with enemy players by you and your nearby raid members STILL will be present in logs. There is no issue here