chatbot icon indicating copy to clipboard operation
chatbot copied to clipboard

Add analytics views on scrubbed_messages

Open nlarew opened this issue 1 year ago • 2 comments

Notes

  • For use in reporting dashboard - rather than duplicating aggregation pipelines in the Charts UI we can pull from these views.

nlarew avatar Aug 07 '24 15:08 nlarew

We don't really have anything set up to test view creation. Ultimately it's not mission critical if these break - we'll just notice that our charts aren't working.

nlarew avatar Aug 07 '24 18:08 nlarew

@mongodben I modified this to be a materialized view instead of an on-demand view. i.e. this is now an aggregation pipeline ending with a $merge that we run from a cron job. I think this will be a good base for any type of aggregated analytics we do in the future.

This shaves off ~50 seconds (currently, more over time) of aggregation query time any time we load/refresh/modify a chart. Basically we'll trade off a bit of software complexity & data that's up to 2 hours old in exchange for tons of time and compute.

Happy to walk through this during standup, probably easier to just point everything out.

nlarew avatar Aug 13 '24 20:08 nlarew

Happy to walk through this during standup, probably easier to just point everything out.

yes pls. maybe we can today?

mongodben avatar Aug 15 '24 14:08 mongodben