Send events information to StatsDB
Description
Click to expand
Who
- -- developer
- @dagiopia -- reviewer
- @dagiopia @kabir.kbr @janaina.senna -- architectural definitions
What
- Update the stats database with events collected by DMS.
- Update telemetry API if we need to change it (https://nunet.gitlab.io/open-api/telemetry-api-spec/develop/).
How
- Send an event information to StatsDB communicating with the gRPC server.
- The available events are defined here: https://gitlab.com/nunet/architecture/-/wikis/Events-Status
- The
device_resource_change
event is being sent in this Issue. - The following priority events should be collected by the DMS and sent to the StatDB in this Issue.
- new_device_onboarded
- service_call (we are considering that the ML job is a service)
- service_status (when the ML job is completed)
- The next events should be collected by the DMS and sent to the StatDB (maybe in another Issue).
- device_status_change
- device_resource_config
- ntx_payment
- new_service
- service_remove
Why
- A peer needs to update the stats db for the overall network status information. Since the NuNet platform is a decentralized p2p infrastructure, there is no way to monitor devices unless the peers to report their status.
When
- No technical dependencies.
Acceptance Criteria
Click to expand
- Code review
- Demo to the dev team
- Telemetry API update (if needed)
Work Breakdown Structure (WBS)
Task | Description | Duration | Status | Start Date | End Date | Comment |
---|---|---|---|---|---|---|
A | Create Placeholder for GRCP calls to StatsDB | 12 Hrs | Done | |||
B | Place an invoke the GRPC call functions at appropriate places | 8 Hrs | Done | |||
C | Collect the telemetry data from the events and pass it to the functions | 16 Hrs | Done |
Edited by Janaina Senna