1 unstable release

0.0.1 Aug 3, 2021

#78 in #telemetry

Apache-2.0

29KB
574 lines

nftmart-telemetry

nftmart node telemetry service

Run

Start telemetry service

$ cargo build && ./main

In another terminal, start your substrate node

$ substrate --dev --ws-external --telemetry-url 'ws://127.0.0.1:8000/submit 0'

or use docker

$ docker run -it --net=host nftmart/node:staging --dev --ws-external --telemetry-url 'ws://127.0.0.1:8000/submit 0'

You should see incoming messages from your node printed on the telemetry service terminal

2021-08-03 11:15:42,226 INFO [nftmart_telemetry] Starting telemetry version: 0.0.1
2021-08-03 11:15:42,241 INFO [actix_server::builder] Starting 4 workers
2021-08-03 11:15:42,281 INFO [actix_server::builder] Starting "actix-web-service-127.0.0.1:8000" service on 127.0.0.1:8000
{"id":1,"payload":{"authority":true,"chain":"Nftmart Testnet","config":"","genesis_hash":"0xe2b7f2375995eb64e832023753302cf01a71f286985f9d523813a6260a592254","implementation":"Nftmart Node","msg":"system.connected","name":"swift-treatment-7017","network_id":"12D3KooWKHns7FzqnKjdj9rx6eEF6HyKRvok7U5mLLDDknpnVbxF","startup_time":"1627960564736","version":"2.0.0-54c3efd-x86_64-linux-gnu"},"ts":"2021-08-03T03:16:09.782058129+00:00"}
{"id":1,"payload":{"best":"0x8a7f96694cb265261dc4ce39d5f49294f9ddcacd213391b59ee0509656d9357c","finalized_hash":"0xe2b7f2375995eb64e832023753302cf01a71f286985f9d523813a6260a592254","finalized_height":0,"height":1,"msg":"system.interval","txcount":0,"used_state_cache_size":784903},"ts":"2021-08-03T03:16:09.781093980+00:00"}
{"id":1,"payload":{"bandwidth_download":0,"bandwidth_upload":0,"msg":"system.interval","peers":0},"ts":"2021-08-03T03:16:09.786164587+00:00"}
{"id":1,"payload":{"best":"0xd2d24ae398571559fff1d0d05203db56604c50b0735b02e4330df1a97f5eaaa2","height":2,"msg":"block.import","origin":"Own"},"ts":"2021-08-03T03:16:12.028486976+00:00"}
{"id":1,"payload":{"best":"0xd2d24ae398571559fff1d0d05203db56604c50b0735b02e4330df1a97f5eaaa2","finalized_hash":"0xe2b7f2375995eb64e832023753302cf01a71f286985f9d523813a6260a592254","finalized_height":0,"height":2,"msg":"system.interval","txcount":0,"used_state_cache_size":785006},"ts":"2021-08-03T03:16:14.781570759+00:00"}
{"id":1,"payload":{"bandwidth_download":0,"bandwidth_upload":0,"msg":"system.interval","peers":0},"ts":"2021-08-03T03:16:14.781761167+00:00"}
{"id":1,"payload":{"best":"0x5cd052614592d68d01ebefcd52f73393366e85f211707cfeba171606860bbd99","height":3,"msg":"block.import","origin":"Own"},"ts":"2021-08-03T03:16:18.036298382+00:00"}
{"id":1,"payload":{"best":"0x8a7f96694cb265261dc4ce39d5f49294f9ddcacd213391b59ee0509656d9357c","height":"1","msg":"notify.finalized"},"ts":"2021-08-03T03:16:19.614010752+00:00"}
{"id":1,"payload":{"best":"0x5cd052614592d68d01ebefcd52f73393366e85f211707cfeba171606860bbd99","finalized_hash":"0x8a7f96694cb265261dc4ce39d5f49294f9ddcacd213391b59ee0509656d9357c","finalized_height":1,"height":3,"msg":"system.interval","txcount":0,"used_state_cache_size":785029},"ts":"2021-08-03T03:16:19.782550704+00:00"}
...

Dependencies

~18–31MB
~555K SLoC