Skip to content

llo observation loop - #19874

Merged
ro-tex merged 3 commits into
developfrom
bm/DS-892-observation-resource-usage
Oct 20, 2025
Merged

ro-tex merged 3 commits into
developfrom
bm/DS-892-observation-resource-usage

Conversation

@brunotm

@brunotm brunotm commented Oct 14, 2025 •

Copy link
Copy Markdown
Collaborator

This change move the LLO streams observations into a async continuous loop that provides pre-fetched stream values to the data source, decoupling the pipeline runs from the plugin observe call. Allows for better data freshness, round throughput and resource consumption of the observation stage.

@brunotm brunotm added the build-publish Build and Publish image to SDLC label Oct 14, 2025
ecPablo
ecPablo previously approved these changes Oct 17, 2025

@ecPablo ecPablo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving deployment/ folder related changes

@cl-sonarqube-production

Copy link
Copy Markdown

lggr := logger.With(d.lggr, "observationTimestamp", opts.ObservationTimestamp(), "configDigest", opts.ConfigDigest(), "seqNr", opts.OutCtx().SeqNr)
// Observation loop logic
{
// Update the list of streams to observe for this config digest and set the timeout

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Update the list of streams to observe for this config digest and set the timeout
// Update the list of streams to observe and set the timeout

}

if deadline, ok := ctx.Deadline(); ok {
osv.observationTimeout = time.Until(deadline)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little odd. On line 215 we check if the observation is still valid by comparing to 2* this value, which seems a little arbitrary. It would be fine and predictable if we compared to the initial value of 250ms but this is a little strange.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We set a default value on L334 to ensure we don't exhaust resources if by any chance this gets set to 0 on the on chain config.

here we extract the deadline (which is max obs duration) which defines both the pace and the timeout. hence 2* for the validity of the TTL. This ensures both the cache and the pace are adjusted to the expected loop run-time. ie. we have enough ttl and and pace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants