itamarst / eliot

Eliot: the logging system that tells you *why* it happened
https://eliot.readthedocs.io
Apache License 2.0
1.09k stars 65 forks source link

Idea - send traces from Eliot as part of Sentry event and problem level type treshold reporting #470

Closed JulianVolodia closed 3 years ago

JulianVolodia commented 3 years ago

Hey,

I am newcomer with 2 ideas. Maybe Eliot already do that?

  1. Could I not store the Eliot output to files but rather use Sentry to get the data with it there? As note or sth?
  2. Is there out-of-the-box (like sentry integration with normal logging engine) tracing mode to track some high severity problems like bottlenecks? How deep Eliot play / integrate, and could track what python/python scripts do?

If that questions are pointless sorry, but You are best knowledge and I would help with development of features if see the usefullness of Eliot in my work.

Best regards.

itamarst commented 3 years ago

Hi,

Thanks for asking!

Eliot supports arbitrary destinations. By default you use a file, but you can do whatever you want with the messages. See https://eliot.readthedocs.io/en/stable/outputting/output.html — instead of printing, as the first example does, you could send messages somewhere else.

However, to get the benefit of Eliot's trace of actions, you'd need to have some way of tying multiple messages together. For Sentry specifically, they have an APM these days (Application Performance Monitoring) which has some functionality similar to Eliot I would guess: https://docs.sentry.io/platforms/python/performance/. It's sampling based, but one option is to sample based on the contents of the message, in which case you could sample only critical messages.

This might address your needs better than Eliot; Eliot tends more logging everything, which depending on your application might or might not be what you want.

JulianVolodia commented 3 years ago

Thanks for very fast response :)