Explore better ways to generalize package event tracking
The following discussion from !63581 (merged) should be addressed:
-
@10io started a discussion: (Non blocking / can be addressed in a follow up)
I like the design of passing a block for the snowplow tracking but I'm wondering if we couldn't leverage an
after
callback. This way, function doesn't need to handle a block.I'm not sure about this as callbacks are stored in namespaces which means that we would need to have a
namespace
block with only this endpoint. This could lead to a result with manynamespace
nested blocks = readability📉 Perhaps, we can open a follow up issue for this.
WDYT?
In package APIs we track things like pull and push events for packages. Currently we just insert a method whenever we want the event to occur, but this is technically blocking code. We could utilize grape callbacks, or refactor to a different design to make using these events more easy/generalized.