Custom event tracking#286
Conversation
0018654 to
17f3482
Compare
17f3482 to
23ffc5f
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
23ffc5f to
29ebef3
Compare
29ebef3 to
381c5a7
Compare
381c5a7 to
8ebdcdb
Compare
925d1bd to
03c8326
Compare
|
|
||
| @config.logger.debug("Reporting #{event_type.upcase} event") | ||
|
|
||
| req = Net::HTTP::Post.new("/api/runtime/events", default_headers) |
There was a problem hiding this comment.
These events can only be sent to zen.aikido.dev, the old runtime API does not support this.
There was a problem hiding this comment.
That's quite an important point for the other agents too. If the agent is unable to connect to zen.aikido.dev, we need to make it really clear that the user events aren't going to work. I wonder if we need a log here, @timokoessler?
There was a problem hiding this comment.
Indeed, makes sense. Maybe log if user calls the track() API for the first time? cc. @hansott.
| def send_user_event(event) | ||
| event_type = "user_event" | ||
|
|
||
| if @rate_limiter.throttle?(event_type) |
There was a problem hiding this comment.
As these events are not send to Aikido Core, maybe not re-use the same rate limiter? (I think this is the case)
03c8326 to
2a48e50
Compare
2a48e50 to
03c8326
Compare
03c8326 to
a13654a
Compare
34372fc to
8bf6fbd
Compare
This change adds support for tracking named user events, sent from application code using
Aikido::Zen.track_user_event. User events include the event name, user ID, and IP address.This change extends and should be reviewed after #285.
Summary by Aikido
🚀 New Features
⚡ Enhancements
More info