#pragma once #include #include class StackTrace; namespace Poco { class Logger; } namespace DB { class TraceLog; class TraceCollector { public: TraceCollector(); ~TraceCollector(); void initialize(std::shared_ptr trace_log_); private: std::shared_ptr getTraceLog(); std::atomic is_trace_log_initialized = false; std::shared_ptr trace_log_ptr; ThreadFromGlobalPool thread; void tryClosePipe(); void run(); }; }