A consumer of trace events and measurements.
The events are produced by Spans and trace::log, the measurements are produced by Metrics::record. Implementations of this interface must be thread-safe.
Definition at line 74 of file Trace.h.
Context clang::clangd::trace::EventTracer::beginSpan |
( |
llvm::StringRef |
Name, |
|
|
llvm::function_ref< void(llvm::json::Object *)> |
AttachDetails |
|
) |
| |
|
virtual |
Called when event that has a duration starts.
Name
describes the event. Returns a derived context that will be destroyed when the event ends. Usually implementations will store an object in the returned context whose destructor records the end of the event. The tracer may capture event details provided in SPAN_ATTACH() calls. In this case it should call AttachDetails(), and pass in an empty Object to hold them. This Object should be owned by the context, and the data will be complete by the time the context is destroyed.
Definition at line 337 of file Trace.cpp.
References clang::clangd::Context::clone(), and clang::clangd::Context::current().