#pragma once #include #include class StackTrace; namespace Poco { class Logger; } namespace DB { class TraceLog; class TraceCollector { public: explicit TraceCollector(std::shared_ptr trace_log_); ~TraceCollector(); static inline void collect(TraceType trace_type, const StackTrace & stack_trace, Int64 size) { return TraceSender::send(trace_type, stack_trace, size); } private: std::shared_ptr trace_log; ThreadFromGlobalPool thread; void run(); void stop(); }; }