Mobrovac has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/327045 )
Change subject: Added trace loggin to be able to do sampled logging ...................................................................... Added trace loggin to be able to do sampled logging Change-Id: Ia0d7f24be68a04b1b8e2df97fb4991b936c6b94a --- M app.js 1 file changed, 5 insertions(+), 1 deletion(-) Approvals: Mobrovac: Verified; Looks good to me, approved diff --git a/app.js b/app.js index e63977b..0a9cfb3 100644 --- a/app.js +++ b/app.js @@ -199,6 +199,11 @@ const editStream = new EditStream(app.conf); editStream.on('edit', (message) => { if (processor.process(message)) { + app.logger.log('trace/event', () => ({ + msg: 'Event processed', + event: JSON.stringify(message) + })); + app.metrics.endTiming(`${message.meta.topic}.delay`, new Date(message.meta.dt)); eventsSincePurge++; } if (eventsSincePurge > app.conf.purge_period) { @@ -206,7 +211,6 @@ processor.purge(new Date(), app.conf.purge_strategy); app.metrics.increment('purge'); } - app.metrics.endTiming(`${message.meta.topic}.delay`, new Date(message.meta.dt)); }); editStream.on('error', (e) => { app.logger.log('error/edit_stream', 'Error in edit stream: ' + e); -- To view, visit https://gerrit.wikimedia.org/r/327045 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia0d7f24be68a04b1b8e2df97fb4991b936c6b94a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/trending-edits Gerrit-Branch: master Gerrit-Owner: Ppchelko <ppche...@wikimedia.org> Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org> Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org> Gerrit-Reviewer: Ppchelko <ppche...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits