BNG statistics exported on prometheus

The BNG statistics now are single events per attachment, the attributes of the events also changed slightly.
The BNG statistics are also all optional, if not present they won't be pushed on Prometheus.

Change-Id: I361578209b35c7bbbcdd6fd8ec37df07a67eb71b
3 files changed
tree: 9315b02a14e637fe21901b9027c3e7a28445f518
  1. .gitignore
  2. .gitreview
  3. CODE_OF_CONDUCT.md
  4. Dockerfile
  5. Gopkg.lock
  6. Gopkg.toml
  7. Makefile
  8. README.md
  9. VERSION
  10. common/
  11. config/
  12. main.go
  13. topic-exporter.go
  14. topic-listener.go
  15. types.go
README.md

Kafka topic exported

Expected format

{
    "type": "slice",
    "ts": 1536617075.762331,
    "slice_data": [
        {
            "metrics": {
                "deferreds": 119.0,
                "rss-mb": 106.0
            },
            "metadata": {
                "logical_device_id": "",
                "title": "voltha.internal",
                "serial_no": "",
                "ts": 1536617075.762331,
                "context": {
                    "instance_id": "vcore-0"
                },     "device_id": ""
           
            }
        }
    ]
}