Skip to content

Latest commit

 

History

History
123 lines (92 loc) · 3.39 KB

File metadata and controls

123 lines (92 loc) · 3.39 KB

Analytics Plugin

Version: 1.0.0

A Analytics plugin for Thunder framework.

Table of Contents

Abbreviation, Acronyms and Terms

[Refer to this link]

Description

The Analytics plugin provides an interface for Analytics.

The plugin is designed to be loaded and executed within the Thunder framework. For more information about the framework refer to [Thunder].

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: Analytics
locator string Library name: libWPEFrameworkAnalytics.so
autostart boolean Determines if the plugin shall be started automatically along with the framework

Methods

The following methods are provided by the Analytics plugin:

Analytics interface methods:

Method Description
sendEvent Send an event to the analytics server

sendEvent

Send an event to the analytics server

Events

Event details will be updated soon.

Parameters

Name Type Description
params object
params.eventName string Name of the event
params.eventVersion string Version of the event
params.eventSource string Source of the event
params.eventSourceVersion string Version of the event source
params.cetList IStringIterator List of CETs
params.cetList[#] string
params.epochTimestamp integer Epoch timestamp of the event
params.uptimeTimestamp integer Uptime timestamp of the event
params.appId string Durable App Id string
params.eventPayload string Payload of the event
params.additionalContext string Additional context for the event

Results

Name Type Description
result null On success null will be returned.

Examples

Request

{
    "jsonrpc": 2.0,
    "id": 0,
    "method": "org.rdk.Analytics.sendEvent",
    "params": {
        "eventName": "",
        "eventVersion": "",
        "eventSource": "",
        "eventSourceVersion": "",
        "cetList": [
            ""
        ],
        "epochTimestamp": 0,
        "uptimeTimestamp": 0,
        "appId": "",
        "eventPayload": "",
        "additionalContext": ""
    }
}

CURL Command

curl -H 'content-type:text/plain;' --data-binary '{"jsonrpc": 2.0, "id": 0, "method": "org.rdk.Analytics.sendEvent", "params": {"eventName": "", "eventVersion": "", "eventSource": "", "eventSourceVersion": "", "cetList": [""], "epochTimestamp": 0, "uptimeTimestamp": 0, "appId": "", "eventPayload": "", "additionalContext": ""}}' http://127.0.0.1:9998/jsonrpc

Response

{
    "jsonrpc": 2.0,
    "id": 0,
    "result": null
}