openfun / potsie

:bar_chart: Grafana dashboards suite for learning analytics
https://demo.potsie.education
MIT License
10 stars 2 forks source link

Modify viewers aggregation #78

Closed quitterie-lcs closed 1 year ago

quitterie-lcs commented 1 year ago

Purpose

Until now, an user aggregation was used for viewers metric computation. But with elasticsearch datasource type, the count reducer function is limited to 500 inputs. Nevertheless, lots of videos count more than 500 users.

Proposal

To overcome this bug from elasticsearch, the cardinality metric is applied on viewed statements and the aggregation is made on context.contextActivities.parent.id (i.e. course session ID).