minitrace/collector/
console_reporter.rs

1// Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0.
2
3use super::global_collector::Reporter;
4use super::SpanRecord;
5
6/// A console reporter that prints span records to the stderr.
7pub struct ConsoleReporter;
8
9impl Reporter for ConsoleReporter {
10    fn report(&mut self, spans: &[SpanRecord]) {
11        for span in spans {
12            eprintln!("{:#?}", span);
13        }
14    }
15}