Module collector

Source

Structsยง

GlobalCollector ๐Ÿ”’
GlobalCollector collects traced hummock operations. It starts a collector thread and writer thread.
MayTraceSpan
TraceSpan
TraceSpan traces hummock operations. It marks the beginning of an operation and the end when the span is dropped. So, please make sure the span live long enough. Underscore binding like let _ = span will drop the span immediately.

Enumsยง

StorageType

Constantsยง

DEFAULT_PATH ๐Ÿ”’
LOG_PATH ๐Ÿ”’
USE_TRACE
WRITER_BUFFER_SIZE ๐Ÿ”’

Staticsยง

CONCURRENT_ID
GLOBAL_COLLECTOR ๐Ÿ”’
GLOBAL_RECORD_ID ๐Ÿ”’
LOCAL_ID
SHOULD_USE_TRACE ๐Ÿ”’
TRACE_RT ๐Ÿ”’

Functionsยง

init_collector
Initialize the GLOBAL_COLLECTOR with configured log file
set_should_use_trace ๐Ÿ”’
Sets the value of the SHOULD_USE_TRACE flag based on the USE_TRACE environment variable
should_use_trace
Returns whether trace should be used based on the environment variable

Type Aliasesยง

ConcurrentId
LocalStorageId
RecordMsg