The events package provides APIs for capturing and analyzing data and usage events.

Data events refer to changes made to the data over time. As data changes, various caches must be updated and notifications emitted notifying affected users. These events may be manually triggered or cleverly setup to watch as your data changes.

Usage events refers to tracking the access of data at various levels. This may include logging each time a Concept is viewed, the terms used when searching for data, etc. This can provide insight to which data are ultimately most (and least) important as well as search trends. These data can be further used for new users to recommend data to get started with.

Log Model

The avocado.events.models.Log model exists to provide a way to store events of various types. Each log message has an event field for tracking the event that caused the logging to occur, but more importantly is the key for aggregating messages by event. For instance, all mesages of the event search can be selected to be analyzed for the most popular search terms.

Each message can be optionally associated with a model instance, such as a DataField or DataConcept to increase the specificity of the message. Likewise messages can be logged on behalf of a user and their session. This provides insight to what data each user regularly accesses and could enable more targeted notifications when certain data changes.