Class ActiveCrawlRegistry
java.lang.Object
ai.pipestream.module.pipelineprobe.pipelinecrawl.ActiveCrawlRegistry
Tracks the
crawl_ids of pipeline-crawl runs that currently have an
open observation stream (an in-flight OrchestrationDriver run).
The sidecar's PipelineEventsConsumer is a single boot-time Kafka
consumer of the platform-wide pipeline-events audit topic — it sees
every crawl's StepExecutionRecords, not just this sidecar's. To avoid
accumulating counts for the entire platform's traffic, the consumer folds a
record into the observation collector ONLY when its crawl_id is
registered here. OrchestrationDriver registers a run's crawl_id when
it starts and unregisters it when the run ends (success or failure), so the
collector's memory is bounded to live runs.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReports whether any crawl currently has an open observation stream.booleanReports whether the given crawl currently has an open observation stream.voidMark a crawl as having an open observation stream.voidunregister(String crawlId) Mark a crawl's observation stream as closed.
-
Constructor Details
-
ActiveCrawlRegistry
public ActiveCrawlRegistry()Default constructor for CDI.
-
-
Method Details
-
register
Mark a crawl as having an open observation stream.- Parameters:
crawlId- the run's crawl id; null/blank is ignored
-
unregister
Mark a crawl's observation stream as closed.- Parameters:
crawlId- the run's crawl id
-
isActive
Reports whether the given crawl currently has an open observation stream.- Parameters:
crawlId- the crawl id from apipeline-eventsrecord- Returns:
- true if this crawl currently has an open observation stream
-
hasActiveCrawls
public boolean hasActiveCrawls()Reports whether any crawl currently has an open observation stream.- Returns:
- true if ANY crawl currently has an open observation stream — the leaked-run sweep refuses to run while one is live, since crawl ids and account ids aren't directly correlatable
-