Skip to content

Trace forwarding protocol

Denis Shevchenko edited this page Oct 25, 2020 · 8 revisions

The Cardano node is able to send its metrics for an external process using TraceForwarderBK plugin, and the external process is able to receive these metrics using TraceAcceptorBK plugin. This guide describes the TraceForwarderBK/TraceAcceptorBK protocol.

Protocol

TraceForwarderBK plugin sends its metrics as a pair of ByteStrings (to be precise, Data.ByteString.Char8):

  1. hostname,
  2. list of LogObjects:

The hostname is a ByteString containing the name of host (for example, "linux") encoded in UTF-8 (source code).

The list of LogObjects is a ByteString conaining [LogObject a] encoded to JSON as UTF-8 (source code).

Example

linux
[{"loname":"cardano.node.release","locontent":{"kind":"LogMessage","message":"ByronProtocol"},"lometa":{"tstamp":"2020-08-11T15:04:32.354943121Z","hostname":"linux","severity":"Notice","privacy":"Public","tid":"48"}},{"loname":"cardano.node.version","locontent":{"kind":"LogMessage","message":"1.18.0"},"lometa":{"tstamp":"2020-08-11T15:04:32.354943121Z","hostname":"linux","severity":"Notice","privacy":"Public","tid":"48"}},{"loname":"cardano.node.commit","locontent":{"kind":"LogMessage","message":"a0eb636"},"lometa":{"tstamp":"2020-08-11T15:04:32.354943121Z","hostname":"linux","severity":"Notice","privacy":"Public","tid":"48"}}]

Links

  1. Data.ByteString.Char8 module.
  2. LogObject a definition.
  3. TraceForwarderBK plugin.
  4. TraceAcceptorBK plugin.
Clone this wiki locally