eliot icon indicating copy to clipboard operation
eliot copied to clipboard

Feature Request: Tracing without modifying the code

Open guettli opened this issue 3 years ago • 1 comments

It would be really great, if you could use eliot without modifying the source code.

I would like to provide a list of methods which should create events:

['mymodule.foo.bar', '....]

And call my code via a wrapper:

eliot myscript.py

guettli avatar Mar 02 '21 11:03 guettli

This in theory would be possible, especially if one says "and you only support arguments that are encodable to JSON" I suppose, but that's hard to guarantee as code changes. Additionally, there's the risk of breaking code if the wrapper changes semantics.

It also won't trace well with anything async, threaded, or multiprocess without a bunch of extra work.

On the other hand I can think of situations where this might be useful, maybe.

What is your use case for doing this?

itamarst avatar Mar 03 '21 15:03 itamarst