}
repeated Meta meta = 22; // Arbitrary meta-data - to be used in future rather than adding new fields all the time
+ // The well known EventTrace event numbers
enum EventType {
- RecRecv = 1;
- DistPipe = 2;
- PCacheCheck = 3;
- SyncRes = 4;
- AnswerSent = 5;
- LuaGetTag = 100;
+ RecRecv = 1; // A request was received by the recursor process
+ PCacheCheck = 2; // A packet cache check was initiated or completed; value: bool cacheHit
+ SyncRes = 3; // Syncres main function has started or completed; value: int rcode
+ AnswerSent = 4; // The answer was sent to the client
+ LuaGetTag = 100; // Events below mark start or end of Lua hook calls; value: return value of hook
LuaGetTagFFI = 101;
LuaIPFilter = 102;
LuaPreRPZ = 103;
LuaNoData = 107;
LuaNXDomain = 108;
}
-
+
message Event {
- required uint64 ts = 1;
- required EventType event = 2;
- required bool start = 3;
- optional bool boolVal = 4;
+ required uint64 ts = 1; // Timestamp in ns relative to time of creation of event trace data structure
+ required EventType event = 2; // Type of event
+ required bool start = 3; // true for "start" events, false for "completed" events
+ optional bool boolVal = 4; // Below are optional values associated with events
optional int64 intVal = 5;
optional string stringVal = 6;
optional bytes bytesVal = 7;
{
// Don't forget to add a new entry to the table in the .cc file!
RecRecv = 1,
- DistPipe = 2,
- PCacheCheck = 3,
- SyncRes = 4,
- AnswerSent = 5,
+ PCacheCheck = 2,
+ SyncRes = 3,
+ AnswerSent = 4,
LuaGetTag = 100,
LuaGetTagFFI = 101,
LuaIPFilter = 102,
return *this;
}
- // We distinguisg beteen string and byres. Does not amtter in C++, but in Go, .Java etc it does
+ // We distinguish between strings and byte arrays. Does not matter in C++, but in Go, Java etc it does
typedef std::variant<std::nullopt_t, bool, int64_t, std::string, PacketBuffer> Value_t;
static std::string toString(const EventType v)