feat(logging): add avatar.get activity event #147
Conversation
|
Fixes #146 |
| .then(avatarOrEmpty) | ||
| .done(function (result) { | ||
| var rep = reply(result); | ||
| if (result.id) { | ||
| rep = rep.etag(result.id); | ||
| } | ||
| var info = { | ||
| event: 'avatar.get', | ||
| uid: req.uid |
philbooth
Sep 21, 2015
Contributor
Should this just be uid?
Should this just be uid?
vladikoff
Sep 21, 2015
Author
Contributor
👍
| event: 'avatar.get', | ||
| uid: uid | ||
| }; | ||
| logger.info('activityEvent', info); |
rfk
Sep 21, 2015
Member
IIUC this will log an event whenever something attempts to read the user's avatar, even if they don't actually have an avatar set (hence the use of avatarOrEmpty above). We could move it into the if (result.id) block to ensure it only emits if there's actually an avatar to read.
@vladikoff is it better to measure avatar-reads or avatar-writes for our metrics purposes?
IIUC this will log an event whenever something attempts to read the user's avatar, even if they don't actually have an avatar set (hence the use of avatarOrEmpty above). We could move it into the if (result.id) block to ensure it only emits if there's actually an avatar to read.
@vladikoff is it better to measure avatar-reads or avatar-writes for our metrics purposes?
vladikoff
Sep 21, 2015
Author
Contributor
@vladikoff is it better to measure avatar-reads or avatar-writes for our metrics purposes?
I think avatar-write should be more useful, but avatar-read also has a use case:
with
avatar-write:
"Users who uploaded an avatar and still using" vs "Users who did not and still using"
avatar-get:
"User fetching avatar after X weeks"
@vladikoff is it better to measure avatar-reads or avatar-writes for our metrics purposes?
I think avatar-write should be more useful, but avatar-read also has a use case:
with
avatar-write:
"Users who uploaded an avatar and still using" vs "Users who did not and still using"
avatar-get:
"User fetching avatar after X weeks"
0351bad
to
4b174dc
|
@rfk @seanmonstar r? |
|
We need this one before we cut v0.46.0 |
|
ping @seanmonstar |
feat(logging): add avatar.get activity event
No description provided.