MongooseIM
MongooseIM copied to clipboard
Stanza tracer
Sometimes it's useful to trace certain XMPP stanzas flowing through the system. It may be used for debugging issues, even in production env.
I think we might try to create a list of requirements for such extension (would be built into MIM).
- Several backends:
- Lager
- Direct write to a file (
disk_log?) - ODBC?
- Tracing based on a
fun(From :: #jid(), To :: #jid{}, Stanza :: #xmlel{}) -> boolean()provided by user. - Set of predefined funs for user's convenience (and easier usage via ctl or REST)
- Possible to limit trace to N first matches or to M seconds
- Must not disturb the system when used on production
- Various storage formats should be allowed
-
term_to_binary -
file:consult- friendly - XML
- IRC-like
-
- The trace should be enabled on all known nodes in a cluster but gathered only on the caller node (?)
- It should be possible to enable debug/info log level for c2s processes of a user.
It's not a final spec, just a bunch of ideas. Will add more when I think of something.
There is also this idea: https://docs.google.com/document/d/1Oo6Y-l-v_Rx21JuCeH6bxypvOaKI77M_Gj7MriAe36M/edit#heading=h.t9zb52292evx Maybe there is something in common.
Another backend can be common tests.
@arcusfelis What do you mean by common tests backend?