Please see updated design below (moving the Telemetry to llvm/lib/Telemetry
)
In a nutshell, a minimal set of the proposal has been moved to llvm/lib/Telemetry
and the rest of the LLDB-specific stuff remains inside LLDB. This should allow for future improvement : (See also the attached PR for more details - i’ve refactored it.)
BaseTelemetryLogger and BaseTelemetryLogger
//llvm/lib/Telemetry/Telemetry.h
class BaseTelemetryLogger {
public:
// Invoked upon tool startup
virtual void LogStartup(llvm::StringRef tool_path,
BaseTelemetryEntry *entry) = 0;
// Invoked upon tool exit.
virtual void LogExit(llvm::StringRef tool_path,
BaseTelemetryEntry *entry) = 0;
virtual void AddDestination(TelemetryDestination *destination) = 0;
};
Anyone else’s contribution of a general-purpose telemetry library are, of course, welcomed. For now, we just don’t want to increase scope of implementation beyond LLDB .