Implement afterSend #6930
Replies: 6 comments
-
It sounds like Relay may cause this to not be as effective as I'd like, but I think we should still add this. It should be more or less universal in any SDK, but if it can't be supported in some thats fine. It should always be "after the transport has delivered the event to the upstream Sentry server", even if that's e.g. after an application restart, or a week after the event happened. There's a variety of historical use cases where this is valuable as a customer:
Additionally if we push things behind this afterSend hook, we can always come back later and find a way to optimize Relay to give more information to SDKs. |
Beta Was this translation helpful? Give feedback.
-
@HazAT let's have a chat about this on Monday. I want to revisit prior conversations about this issue with you. The main motivator for not providing this is that It might be possible to support for some simple cases and just say that the callback is not invoked/always invoked for situations where it can't otherwise work. Having a general "afterSend" that might be possible if we don't guarantee when it's called, what the state about it is and that hints are no longer available. That does limit the usefulness of it, but might be good enough for some use cases. I would be curious though if this would support the use case still where attachments would be sent delayed. |
Beta Was this translation helpful? Give feedback.
-
Adding to use-cases: being able to access the id in server result is useful to cross-reference sentry events with other data. Currently to achieve that without logging excessive user information to sentry, only way is to generate a uuid on the server associated with the other data which is sent to sentry as part of "enrichment". |
Beta Was this translation helpful? Give feedback.
-
Relates to: getsentry/sentry-dart#352 |
Beta Was this translation helpful? Give feedback.
-
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 label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Beta Was this translation helpful? Give feedback.
-
We need a hook after an event is sent (likely also even when the event fails).
Needed data:
Once this is implemented we need to update attachment and feedback examples to use this hook.
Beta Was this translation helpful? Give feedback.
All reactions