File tree Expand file tree Collapse file tree 6 files changed +99
-1
lines changed
event_bus/avro/tests/schemas Expand file tree Collapse file tree 6 files changed +99
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ Change Log
14
14
Unreleased
15
15
----------
16
16
17
+ [9.1.0] - 2023-11-07
18
+ --------------------
19
+ Added
20
+ ~~~~~~~
21
+ * Added new event TRACKING_EVENT_EMITTED.
22
+
17
23
[9.0.1] - 2023-10-31
18
24
--------------------
19
25
Changed
Original file line number Diff line number Diff line change 5
5
more information about the project.
6
6
"""
7
7
8
- __version__ = "9.0.1 "
8
+ __version__ = "9.1.0 "
Original file line number Diff line number Diff line change
1
+ """
2
+ Package where events related to the analytics subdomain are implemented.
3
+
4
+ The analytics subdomain corresponds to {Architecture Subdomain} defined in
5
+ the OEP-41.
6
+ """
Original file line number Diff line number Diff line change
1
+ """
2
+ Data attributes for events within the architecture subdomain ``analytics``.
3
+
4
+ These attributes follow the form of attr objects specified in OEP-49 data
5
+ pattern.
6
+ """
7
+
8
+ from datetime import datetime
9
+
10
+ import attr
11
+
12
+
13
+ @attr .s (frozen = True )
14
+ class TrackingLogData :
15
+ """
16
+ Data describing tracking events.
17
+
18
+ Arguments:
19
+ name (str): event name
20
+ timestamp (datetime): timestamp of the event
21
+ data (str): json string representation of a dictionary with extra data (optional),
22
+ e.g. {"course_id": "course-v1:edX+DemoX+Demo_Course"}
23
+ context (dict): json string representation of a dictionary of context data
24
+ defined in https://edx.readthedocs.io/projects/devdata/en/latest/internal_data_formats/tracking_logs/
25
+ """
26
+
27
+ name = attr .ib (type = str )
28
+ timestamp = attr .ib (type = datetime )
29
+ data = attr .ib (type = str )
30
+ context = attr .ib (type = str )
Original file line number Diff line number Diff line change
1
+ """
2
+ Standardized signals definitions for events within the architecture subdomain ``analytics``.
3
+
4
+ All signals defined in this module must follow the name and versioning
5
+ conventions specified in OEP-41.
6
+
7
+ They also must comply with the payload definition specified in
8
+ docs/decisions/0003-events-payload.rst
9
+ """
10
+
11
+ from openedx_events .analytics .data import TrackingLogData
12
+ from openedx_events .tooling import OpenEdxPublicSignal
13
+
14
+ # .. event_type: org.openedx.analytics.tracking.event.emitted.v1
15
+ # .. event_name: TRACKING_EVENT_EMITTED
16
+ # .. event_description: emitted when a tracking log is created.
17
+ # .. event_data: TrackingLogData
18
+ TRACKING_EVENT_EMITTED = OpenEdxPublicSignal (
19
+ event_type = "org.openedx.analytics.tracking.event.emitted.v1" ,
20
+ data = {
21
+ "tracking_log" : TrackingLogData ,
22
+ }
23
+ )
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " CloudEvent" ,
3
+ "type" : " record" ,
4
+ "doc" : " Avro Event Format for CloudEvents created with openedx_events/schema" ,
5
+ "fields" : [
6
+ {
7
+ "name" : " tracking_log" ,
8
+ "type" : {
9
+ "name" : " TrackingLogData" ,
10
+ "type" : " record" ,
11
+ "fields" : [
12
+ {
13
+ "name" : " name" ,
14
+ "type" : " string"
15
+ },
16
+ {
17
+ "name" : " timestamp" ,
18
+ "type" : " string"
19
+ },
20
+ {
21
+ "name" : " data" ,
22
+ "type" : " string"
23
+ },
24
+ {
25
+ "name" : " context" ,
26
+ "type" : " string"
27
+ }
28
+ ]
29
+ }
30
+ }
31
+ ],
32
+ "namespace" : " org.openedx.analytics.tracking.event.emitted.v1"
33
+ }
You can’t perform that action at this time.
0 commit comments