MongooseIM icon indicating copy to clipboard operation
MongooseIM copied to clipboard

Stanza tracer

Open fen-pl opened this issue 9 years ago • 3 comments

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.

fen-pl avatar Aug 30 '16 13:08 fen-pl

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.

bartekgorny avatar Aug 30 '16 14:08 bartekgorny

Another backend can be common tests.

arcusfelis avatar Aug 31 '16 15:08 arcusfelis

@arcusfelis What do you mean by common tests backend?

fen-pl avatar Sep 01 '16 10:09 fen-pl