Show the crate…

1 stable release

2.0.0 Apr 4, 2021
0.0.0 Mar 6, 2021

#25 in #background-task

Download history 27/week @ 2023-12-13 26/week @ 2023-12-20 9/week @ 2023-12-27 9/week @ 2024-01-03 45/week @ 2024-01-10 18/week @ 2024-01-17 11/week @ 2024-01-24 7/week @ 2024-01-31 22/week @ 2024-02-07 36/week @ 2024-02-14 36/week @ 2024-02-21 54/week @ 2024-02-28 44/week @ 2024-03-06 33/week @ 2024-03-13 58/week @ 2024-03-20 57/week @ 2024-03-27

194 downloads per month
Used in 36 crates (12 directly)

GPL-3.0-or-later…

59KB
1K SLoC

tc-telemetry

Tetcore's client telemetry is a part of tetcore that allows ingesting telemetry data with for example Polkadot telemetry.

It works using Tokio's tracing library. The telemetry information uses tracing's logging to report the telemetry data which is then retrieved by a tracing Layer. This layer will then send the data through an asynchronous channel to a background task called TelemetryWorker which will send the information to the configured remote telemetry servers.

If multiple tetcore nodes are running in the same process, it uses a tracing::Span to identify which tetcore node is reporting the telemetry. Every task spawned using tc-service's TaskManager automatically inherit this span.

Tetcore's nodes initialize/register with the TelemetryWorker using a TelemetryHandle. This handle can be cloned and passed around. It uses an asynchronous channel to communicate with the running TelemetryWorker dedicated to registration. Registering can happen at any point in time during the process execution.

License: GPL-3.0-or-later WITH Classpath-exception-2.0

Dependencies

~15–29MB
~452K SLoC