sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

[Experiment] Added log messages where lifecycle hooks could be

Open antonpirker opened this issue 2 years ago • 3 comments

If we want to make lifecycle hooks a reality at some point, I guess we start with small steps.

I added some debug messages to places where lifecycle hooks could be. We can bike-shed about the names in this PR!

This already uncovered some places where our architecture needs some improvements to have a nice implementation.

This absolutely floods our debug log with messages, so maybe we remove some before we merge these.

antonpirker avatar Sep 07 '23 07:09 antonpirker

Nice! I think this is a good experiment. Just skimmed through and these make sense to me as hooks. (We can ofc still discuss trimming it down and bikeshed about naming. 😄)

This already uncovered some places where our architecture needs some improvements to have a nice implementation.

What places for example? 👀

sentrivana avatar Sep 07 '23 08:09 sentrivana

fine in principle,

  • just make sure you don't log the whole event anywhere, this caused problems in the past
  • i would argue on the naming that you don't just call them as what is being done but what the hook will be
    • transaction_finish -> transaction.on_finish
    • scope_apply_to_event -> scope.before/after_apply
    • span_start -> span.before/after_start

sl0thentr0py avatar Sep 07 '23 11:09 sl0thentr0py

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Oct 18 '23 07:10 getsantry[bot]

Closing for now, because this will not come anytime soon and we are in the middle of bigger changes with using otel, which probably change the requirements a bit.

antonpirker avatar Jul 18 '24 11:07 antonpirker