CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::CallLogEntry Class Reference

One entry of the gateway's call log: who called what, how it was routed, how long each stage took, and the outcome. More...

#include <RequestGateway.h>

Collaboration diagram for cmlabs::CallLogEntry:
[legend]

Public Member Functions

 CallLogEntry (uint64 id=0)
virtual ~CallLogEntry ()
std::string toJSON ()

Public Attributes

uint64 id
 Unique call id.
uint8 conType
 Ingress type — 1: client 2: web 3: websocket.
uint8 messageType
 Wire format — 1: message 2: http 3: https.
bool longRequest
 Whether the request was classified long.
uint64 source
 Caller endpoint packed as uint64.
uint16 port
 Gateway port the call arrived on.
uint64 executorID
 Executor that processed the request.
uint64 clientID
 Client connection id.
uint32 accountID
 Authenticated account id (0 if anonymous).
uint64 startTime
 Request arrival time (ms epoch).
uint64 endTime
 Reply completion time (ms epoch).
uint64 queueTime
 Time spent queued before dispatch (µs).
uint64 processTime
 Time spent processing in the executor (µs).
uint8 requestType
 HTTP_* method id (for web ingress).
uint32 requestSize
 Request payload size in bytes.
uint32 replySize
 Reply payload size in bytes.
std::string status
 Outcome status text.
std::string requestPath
 Request name/URI.
std::string agent
 Caller's User-Agent (web ingress).
std::string output
 Output/diagnostic note.

Detailed Description

One entry of the gateway's call log: who called what, how it was routed, how long each stage took, and the outcome.

Serialisable to JSON for the diagnostics API.

Definition at line 60 of file RequestGateway.h.

Constructor & Destructor Documentation

◆ CallLogEntry()

cmlabs::CallLogEntry::CallLogEntry ( uint64 id = 0)
inline

◆ ~CallLogEntry()

virtual cmlabs::CallLogEntry::~CallLogEntry ( )
inlinevirtual

Definition at line 70 of file RequestGateway.h.

Member Function Documentation

◆ toJSON()

std::string cmlabs::CallLogEntry::toJSON ( )
inline

Member Data Documentation

◆ accountID

uint32 cmlabs::CallLogEntry::accountID

Authenticated account id (0 if anonymous).

Definition at line 105 of file RequestGateway.h.

Referenced by CallLogEntry(), and toJSON().

◆ agent

std::string cmlabs::CallLogEntry::agent

Caller's User-Agent (web ingress).

Definition at line 115 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog().

◆ clientID

uint64 cmlabs::CallLogEntry::clientID

Client connection id.

Definition at line 104 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ conType

uint8 cmlabs::CallLogEntry::conType

Ingress type — 1: client 2: web 3: websocket.

Definition at line 98 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ endTime

uint64 cmlabs::CallLogEntry::endTime

Reply completion time (ms epoch).

Definition at line 107 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ executorID

uint64 cmlabs::CallLogEntry::executorID

Executor that processed the request.

Definition at line 103 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ id

uint64 cmlabs::CallLogEntry::id

Unique call id.

Definition at line 97 of file RequestGateway.h.

Referenced by CallLogEntry().

◆ longRequest

bool cmlabs::CallLogEntry::longRequest

Whether the request was classified long.

Definition at line 100 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ messageType

uint8 cmlabs::CallLogEntry::messageType

Wire format — 1: message 2: http 3: https.

Definition at line 99 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ output

std::string cmlabs::CallLogEntry::output

Output/diagnostic note.

Definition at line 116 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), and toJSON().

◆ port

uint16 cmlabs::CallLogEntry::port

Gateway port the call arrived on.

Definition at line 102 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ processTime

uint64 cmlabs::CallLogEntry::processTime

Time spent processing in the executor (µs).

Definition at line 109 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ queueTime

uint64 cmlabs::CallLogEntry::queueTime

Time spent queued before dispatch (µs).

Definition at line 108 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ replySize

uint32 cmlabs::CallLogEntry::replySize

Reply payload size in bytes.

Definition at line 112 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ requestPath

std::string cmlabs::CallLogEntry::requestPath

Request name/URI.

Definition at line 114 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), and toJSON().

◆ requestSize

uint32 cmlabs::CallLogEntry::requestSize

Request payload size in bytes.

Definition at line 111 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ requestType

uint8 cmlabs::CallLogEntry::requestType

HTTP_* method id (for web ingress).

Definition at line 110 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ source

uint64 cmlabs::CallLogEntry::source

Caller endpoint packed as uint64.

Definition at line 101 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ startTime

uint64 cmlabs::CallLogEntry::startTime

Request arrival time (ms epoch).

Definition at line 106 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), CallLogEntry(), and toJSON().

◆ status

std::string cmlabs::CallLogEntry::status

Outcome status text.

Definition at line 113 of file RequestGateway.h.

Referenced by cmlabs::RequestGateway::addToCallLog(), and toJSON().


The documentation for this class was generated from the following file: