Interface: ConnectionStats
Return type of connection.getStats(), JSON-serializable.
All timestamps are Date | null (not epoch milliseconds). JSON.stringify()
serialises them to ISO 8601 strings by default with no information loss.
Example
const stats = conn.getStats();
logger.info(JSON.stringify(stats)); // safe: all values are JSON-serializable
Properties
bytesIn
readonlybytesIn:number
bytesOut
readonlybytesOut:number
connectedAt
readonlyconnectedAt:Date|null
connectionId
readonlyconnectionId:string
lastByteInAt
readonlylastByteInAt:Date|null
lastByteOutAt
readonlylastByteOutAt:Date|null
remoteAddress
readonlyremoteAddress:string|null
remotePort
readonlyremotePort:number|null
state
readonlystate:ConnectionState
warningsByCode
readonlywarningsByCode:Record<string,number>
warningsTruncated
readonlywarningsTruncated:boolean