forked from rdkcentral/rdkservices
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RDK-54875: Analytics plugin documentation
- Loading branch information
Adrian Muzyka
authored and
Adrian Muzyka
committed
Dec 3, 2024
1 parent
ab38eb4
commit 6ccdcdf
Showing
5 changed files
with
270 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,120 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/plugin.schema.json", | ||
"info": { | ||
"title": "Analytics Plugin", | ||
"callsign": "org.rdk.Analytics", | ||
"locator": "libWPEFrameworkAnalytics.so", | ||
"status": "development", | ||
"description": "The `Analytics` plugin allows to send analytics events to dedicated backends." | ||
}, | ||
"interface": { | ||
"$ref": "Analytics.json#" | ||
} | ||
} | ||
"$schema":"https://raw.githubusercontent.com/rdkcentral/rdkservices/main/Tools/json_generator/schemas/plugin.schema.json", | ||
"info":{ | ||
"title":"Analytics Plugin", | ||
"callsign":"org.rdk.Analytics", | ||
"locator":"libWPEFrameworkAnalytics.so", | ||
"status":"development", | ||
"description":"The `Analytics` plugin allows to send analytics events to dedicated backends. Currently the SIFT backend is supported." | ||
}, | ||
"configuration":{ | ||
"type":"object", | ||
"properties":{ | ||
"configuration":{ | ||
"type":"object", | ||
"properties":{ | ||
"deviceosname":{ | ||
"description":"Device OS name", | ||
"type":"string" | ||
}, | ||
"sift":{ | ||
"type":"object", | ||
"properties":{ | ||
"schema2":{ | ||
"description":"If true, enables Sift 2.0 schema, otherwise uses Sift 1.0 schema", | ||
"type":"boolean" | ||
}, | ||
"commonschema":{ | ||
"description":"Sift schema common schema", | ||
"type":"string" | ||
}, | ||
"env":{ | ||
"description":"Sift schema environment", | ||
"type":"string" | ||
}, | ||
"productname":{ | ||
"description":"Sift schema product name", | ||
"type":"string" | ||
}, | ||
"loggername":{ | ||
"description":"Sift schema logger name", | ||
"type":"string" | ||
}, | ||
"loggerversion":{ | ||
"description":"Sift schema logger version", | ||
"type":"string" | ||
}, | ||
"platformdefault":{ | ||
"description":"Sift schema platform default value", | ||
"type":"string" | ||
}, | ||
"maxrandomisationwindowtime":{ | ||
"description":"Sift uploader max randomisation window time of posting queued events in seconds", | ||
"type":"number" | ||
}, | ||
"maxeventsinpost":{ | ||
"description":"Sift uploader max events in single post", | ||
"type":"number" | ||
}, | ||
"maxretries":{ | ||
"description":"Sift uploader max retries posting events", | ||
"type":"number" | ||
}, | ||
"minretryperiod":{ | ||
"description":"Sift uploader min retry period seconds", | ||
"type":"number" | ||
}, | ||
"maxretryperiod":{ | ||
"description":"Sift uploader max retry period seconds", | ||
"type":"number" | ||
}, | ||
"exponentialperiodicfactor":{ | ||
"description":"Sift uploader exponential periodic factor for retry delay", | ||
"type":"number" | ||
}, | ||
"storepath":{ | ||
"description":"Sift store path to persistent queue with events", | ||
"type":"number" | ||
}, | ||
"eventslimit":{ | ||
"description":"Sift store events limit", | ||
"type":"number" | ||
}, | ||
"url":{ | ||
"description":"URL to Sift server endpoint", | ||
"type":"string" | ||
} | ||
}, | ||
"required":[ | ||
"schema2", | ||
"commonschema", | ||
"productname", | ||
"loggername", | ||
"loggerversion", | ||
"platformdefault", | ||
"maxrandomisationwindowtime", | ||
"maxeventsinpost", | ||
"maxretries", | ||
"minretryperiod", | ||
"maxretryperiod", | ||
"exponentialperiodicfactor", | ||
"storepath", | ||
"eventslimit", | ||
"url" | ||
] | ||
} | ||
}, | ||
"required":[ | ||
"deviceosname", | ||
"sift" | ||
] | ||
} | ||
}, | ||
"required":[ | ||
"configuration" | ||
] | ||
}, | ||
"interface":{ | ||
"$ref":"Analytics.json#" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<!-- Generated automatically, DO NOT EDIT! --> | ||
<a name="head.Analytics_Plugin"></a> | ||
# Analytics Plugin | ||
|
||
**Version: [1.0.1](https://github.com/rdkcentral/rdkservices/blob/main/Analytics/CHANGELOG.md)** | ||
|
||
A org.rdk.Analytics plugin for Thunder framework. | ||
|
||
### Table of Contents | ||
|
||
- [Abbreviation, Acronyms and Terms](#head.Abbreviation,_Acronyms_and_Terms) | ||
- [Description](#head.Description) | ||
- [Configuration](#head.Configuration) | ||
- [Methods](#head.Methods) | ||
|
||
<a name="head.Abbreviation,_Acronyms_and_Terms"></a> | ||
# Abbreviation, Acronyms and Terms | ||
|
||
[[Refer to this link](userguide/aat.md)] | ||
|
||
<a name="head.Description"></a> | ||
# Description | ||
|
||
The `Analytics` plugin allows to send analytics events to dedicated backends. Currently the SIFT backend is supported. | ||
|
||
The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [[Thunder](#ref.Thunder)]. | ||
|
||
<a name="head.Configuration"></a> | ||
# Configuration | ||
|
||
The table below lists configuration options of the plugin. | ||
|
||
| Name | Type | Description | | ||
| :-------- | :-------- | :-------- | | ||
| callsign | string | Plugin instance name (default: *org.rdk.Analytics*) | | ||
| classname | string | Class name: *org.rdk.Analytics* | | ||
| locator | string | Library name: *libWPEFrameworkAnalytics.so* | | ||
| autostart | boolean | Determines if the plugin shall be started automatically along with the framework | | ||
| configuration | object | | | ||
| configuration.deviceosname | string | Device OS name | | ||
| configuration.sift | object | | | ||
| configuration.sift.schema2 | boolean | If true, enables Sift 2.0 schema, otherwise uses Sift 1.0 schema | | ||
| configuration.sift.commonschema | string | Sift schema common schema | | ||
| configuration.sift?.env | string | <sup>*(optional)*</sup> Sift schema environment | | ||
| configuration.sift.productname | string | Sift schema product name | | ||
| configuration.sift.loggername | string | Sift schema logger name | | ||
| configuration.sift.loggerversion | string | Sift schema logger version | | ||
| configuration.sift.platformdefault | string | Sift schema platform default value | | ||
| configuration.sift.maxrandomisationwindowtime | number | Sift uploader max randomisation window time of posting queued events in seconds | | ||
| configuration.sift.maxeventsinpost | number | Sift uploader max events in single post | | ||
| configuration.sift.maxretries | number | Sift uploader max retries posting events | | ||
| configuration.sift.minretryperiod | number | Sift uploader min retry period seconds | | ||
| configuration.sift.maxretryperiod | number | Sift uploader max retry period seconds | | ||
| configuration.sift.exponentialperiodicfactor | number | Sift uploader exponential periodic factor for retry delay | | ||
| configuration.sift.storepath | number | Sift store path to persistent queue with events | | ||
| configuration.sift.eventslimit | number | Sift store events limit | | ||
| configuration.sift.url | string | URL to Sift server endpoint | | ||
|
||
<a name="head.Methods"></a> | ||
# Methods | ||
|
||
The following methods are provided by the org.rdk.Analytics plugin: | ||
|
||
Analytics interface methods: | ||
|
||
| Method | Description | | ||
| :-------- | :-------- | | ||
| [sendEvent](#method.sendEvent) | Enqueue an event to be sent to the SIFT analytics backend | | ||
|
||
|
||
<a name="method.sendEvent"></a> | ||
## *sendEvent [<sup>method</sup>](#head.Methods)* | ||
|
||
Enqueue an event to be sent to the SIFT analytics backend. | ||
|
||
### Events | ||
|
||
No Events | ||
|
||
### Parameters | ||
|
||
| Name | Type | Description | | ||
| :-------- | :-------- | :-------- | | ||
| params | object | | | ||
| params.eventName | string | Name of the event | | ||
| params?.eventVersion | string | <sup>*(optional)*</sup> Version number of event schema | | ||
| params.eventSource | string | Name of the component that originates the event (Durable App ID if an App) | | ||
| params.eventSourceVersion | string | Version number for the component that originates the event | | ||
| params.cetList | array | An array of Capability Exclusion Tags to be included on the report. Each CET will exclude the event from being processed for the specified process, any may result in the event being dropped. May be an array of length zero | | ||
| params.cetList[#] | string | | | ||
| params?.epochTimestamp | integer | <sup>*(optional)*</sup> Timestamp for the START of this event, epoch time, in ms UTC | | ||
| params?.uptimeTimestamp | integer | <sup>*(optional)*</sup> Timestamp for the START of this event, uptime of the device, in ms. ONLY to be used when Time quality is not good | | ||
| params.eventPayload | object | Custom payload of the event in JSON format. User defined colection of objects and keys. May be an empty object | | ||
| params.eventPayload.keyOrObject | string | User defined custom key or object | | ||
|
||
### Result | ||
|
||
| Name | Type | Description | | ||
| :-------- | :-------- | :-------- | | ||
| result | string | On success null will be returned | | ||
|
||
### Example | ||
|
||
#### Request | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 42, | ||
"method": "org.rdk.Analytics.sendEvent", | ||
"params": { | ||
"eventName": "app_summary", | ||
"eventVersion": "1.0.0", | ||
"eventSource": "epg", | ||
"eventSourceVersion": "1.0.0", | ||
"cetList": [ | ||
"cet1" | ||
], | ||
"epochTimestamp": 1721906631000, | ||
"uptimeTimestamp": 35000, | ||
"eventPayload": { | ||
"keyOrObject": "value1" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
#### Response | ||
|
||
```json | ||
{ | ||
"jsonrpc": "2.0", | ||
"id": 42, | ||
"result": "null" | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters