LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
analyzer::ActorDiscoverer Class Reference

#include <ActorDiscoverer.hpp>

Collaboration diagram for analyzer::ActorDiscoverer:
Collaboration graph

Static Public Member Functions

static ActorDiscoveryResult Discover (db::EventsContainer &events, size_t sampleLimit=10 '000)
 Scan up to sampleLimit events and return all discovered patterns.
 
static ActorDiscoveryResult DiscoverWithAI (db::EventsContainer &events, size_t sampleLimit=10 '000)
 
static std::string ToLower (const std::string &s)
 
static int ScoreSender (const std::string &fieldName)
 
static int ScoreReceiver (const std::string &fieldName)
 
static int ScoreActor (const std::string &fieldName)
 
static int ScoreLabel (const std::string &fieldName)
 
static int ScoreDirection (const std::string &fieldName, const std::set< std::string > &values, std::set< std::string > &outValues, std::set< std::string > &inValues)
 
static std::tuple< std::string, std::set< std::string >, int > DetectSeparatorPattern (const std::set< std::string > &fieldValues)
 

Detailed Description

Scans an EventsContainer and discovers every plausible actor/exchange pattern without hard-coded field names.

Detected patterns (in decreasing confidence order): Pair — two fields: senderField + receiverField DirectionField — one actor field + one direction-value field SenderOnly — only a sender-type field; receiver = self ReceiverOnly — only a receiver-type field; sender = self

Works on every log format: JSON microservices, DLT (ecuid/appid), CAN-bus, XML traces, syslog, custom formats.

Member Function Documentation

◆ DetectSeparatorPattern()

std::tuple< std::string, std::set< std::string >, int > analyzer::ActorDiscoverer::DetectSeparatorPattern ( const std::set< std::string > &  fieldValues)
static

Detects if a field contains embedded actor names with a separator. Returns (separator, extractedActors, confidence) or empty if not detected. Example: "RBC: message" → separator=":", actors={"RBC"}

Here is the caller graph for this function:

◆ Discover()

ActorDiscoveryResult analyzer::ActorDiscoverer::Discover ( db::EventsContainer &  events,
size_t  sampleLimit = 10'000 
)
static

Scan up to sampleLimit events and return all discovered patterns.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DiscoverWithAI()

ActorDiscoveryResult analyzer::ActorDiscoverer::DiscoverWithAI ( db::EventsContainer &  events,
size_t  sampleLimit = 10'000 
)
static

Discover with AI direction detection (if LLM available). Combines heuristic actor discovery with AI-detected message directions.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScoreActor()

int analyzer::ActorDiscoverer::ScoreActor ( const std::string &  fieldName)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScoreDirection()

int analyzer::ActorDiscoverer::ScoreDirection ( const std::string &  fieldName,
const std::set< std::string > &  values,
std::set< std::string > &  outValues,
std::set< std::string > &  inValues 
)
static

Returns how well a field's VALUES match known direction keywords. outCount / inCount — how many values matched outgoing / incoming.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScoreLabel()

int analyzer::ActorDiscoverer::ScoreLabel ( const std::string &  fieldName)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScoreReceiver()

int analyzer::ActorDiscoverer::ScoreReceiver ( const std::string &  fieldName)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScoreSender()

int analyzer::ActorDiscoverer::ScoreSender ( const std::string &  fieldName)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToLower()

std::string analyzer::ActorDiscoverer::ToLower ( const std::string &  s)
static
Here is the caller graph for this function:

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