Crate tc_telemetry

Crate tc_telemetry 

Source
Expand description

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.

Re-exports§

pub use serde_json;
pub use tracing;

Macros§

telemetry
Report a telemetry.

Structs§

ConnectionMessage
Message sent when the connection (re-)establishes.
ExtTransport
Implementation of Transport whose implementation is handled by some FFI.
TelemetryConnectionNotifier
Used to create a stream of events with only one event: when a telemetry connection (re-)establishes.
TelemetryEndpoints
List of telemetry servers we want to talk to. Contains the URL of the server, and the maximum verbosity level.
TelemetryHandle
Handle to the TelemetryWorker thats allows initializing the telemetry for a Tetcore node.
TelemetryLayer
Layer that handles the logs for telemetries.
TelemetrySpan
A handle representing a telemetry span, with the capability to enter the span if it exists.
TelemetryWorker
Telemetry worker.

Constants§

CONSENSUS_DEBUG
Consensus DEBUG log level.
CONSENSUS_INFO
Consensus INFO log level.
CONSENSUS_TRACE
Consensus TRACE log level.
CONSENSUS_WARN
Consensus WARN log level.
TELEMETRY_LOG_SPAN
Span name used to report the telemetry.
TETCORE_DEBUG
Tetcore DEBUG log level.
TETCORE_INFO
Tetcore INFO log level.