logmill

Simple, straightforward logging and event tracking.


Keywords
logging, async, event, tracking
License
MIT
Install
pip install logmill==0.0.1

Documentation

Logmill

A single-library logging and eventing service.

Notes (more current than below)

Misc thoughts

  • Standardized terminology is important too
  • Uptime and health metrics are definitely important

From a business perspective:

  • What reliability requirements?
  • Better for duplicated events vs dropped events (better duplicated)

Joining on eg. user_id is important; other queries are great

Funnels are great too (that's a join on user_id)

Would it be possible to use AST manipulation to automatically instrument every coroutine? You could automatically add a context variable into stuff. This would, of course, be a lot easier to do if PEP 550/555 lands, and we can just use context variables directly.

That would also make it more or less trivial to handle multiple different kinds of event loop runners. HOWEVER, it's only going to work if you are directly going up or down the call stack.

You could automatically do something like these replacements:

async def foo(*args, **kwargs):
    await sleep(30)

converted to:

async def foo(*args, _logrunner_context=None, **kwargs):
    if _logrunner_context is None:
        _logrunner_context = LogrunnerContext(foo)

    await sleep(30, _logrunner_context=_logrunner_context)

The difficulty here is going to be, hey, what if this is a C function call or something, where we can't change the call signature.