Struct zebrad::config::TracingSection[][src]

pub struct TracingSection {
    pub use_color: bool,
    pub filter: Option<String>,
    pub endpoint_addr: Option<SocketAddr>,
    pub flamegraph: Option<PathBuf>,
    pub use_journald: bool,

Tracing configuration section.


use_color: bool

Whether to use colored terminal output, if available.

Colored terminal output is automatically disabled if an output stream is connected to a file. (Or another non-terminal device.)

Defaults to true, which automatically enables colored output to terminals.

filter: Option<String>

The filter used for tracing events.

The filter is used to create a tracing-subscriber EnvFilter, and more details on the syntax can be found there or in the examples below.

If no filter is specified (None), the filter is set to info if the -v flag is given and warn if it is not given.


warn,zebrad=info,zebra_network=debug sets a global warn level, an info level for the zebrad crate, and a debug level for the zebra_network crate.


sets trace level for all events occurring in the context of a block_verify span whose height field ends in 000, i.e., traces the verification of every 1000th block.

endpoint_addr: Option<SocketAddr>

The address used for an ad-hoc RPC endpoint allowing dynamic control of the tracing filter.

If this is set to None, the endpoint is disabled.

flamegraph: Option<PathBuf>

Controls whether to write a flamegraph of tracing spans.

If this is set to None, flamegraphs are disabled. Otherwise, it specifies an output file path, as described below.

This path is not used verbatim when writing out the flamegraph. This is because the flamegraph is written out as two parts. First the flamegraph is constantly persisted to the disk in a “folded” representation that records collapsed stack traces of the tracing spans that are active. Then, when the application is finished running the destructor will flush the flamegraph output to the folded file and then read that file and generate the final flamegraph from it as an SVG.

The need to create two files means that we will slightly manipulate the path given to us to create the two representations.


Given flamegraph = "flamegraph" we will generate a flamegraph.svg and a flamegraph.folded file in the current directory.

If you provide a path with an extension the extension will be ignored and replaced with .folded and .svg for the respective files.

use_journald: bool

The use_journald flag sends tracing events to systemd-journald, on Linux distributions that use systemd.

Trait Implementations

impl Clone for TracingSection[src]

impl Debug for TracingSection[src]

impl Default for TracingSection[src]

impl<'de> Deserialize<'de> for TracingSection where
    TracingSection: Default

impl Serialize for TracingSection[src]

Auto Trait Implementations

impl RefUnwindSafe for TracingSection

impl Send for TracingSection

impl Sync for TracingSection

impl Unpin for TracingSection

impl UnwindSafe for TracingSection

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> AsAny for T where
    T: Any

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<C> Config for C where
    C: Debug + Default + DeserializeOwned

impl<T> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<D> OwoColorize for D

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 

impl<T> Erased for T