x-pack/filebeat/input/cel: allow CEL programs to know remaining budget#46210
x-pack/filebeat/input/cel: allow CEL programs to know remaining budget#46210efd6 merged 3 commits intoelastic:mainfrom
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
For CEL-based integrations with a large number of pagination cycles, it may be helpful for the program to be aware of the number of remaining execution cycles, either to simply avoid degraded health status, or to react differently and store cursor state for the next periodic evaluation.
31f3bfb to
430fef0
Compare
🔍 Preview links for changed docs |
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
ShourieG
left a comment
There was a problem hiding this comment.
LGTM.
One query though:
In most scenarios the number of pages are not known beforehand and we iterate till size(response.body) >0 . I'm guessing this is only for scenarios where we have this number available in the response.
|
This feature does not need to be used. But I discovered a use for it specifically in the context that you describe, where the number of pages is not known. An example of how you might use it in that context is to put the current working state into the cursor on the last available iteration and the resume work when the next periodic run starts. In the case where I'm using a hand-rolled version, I'm always storing the working state in the cursor and using the number of runs relative to the maximum as a way to avoid triggering a degraded health update. |
vishaangelova
left a comment
There was a problem hiding this comment.
LGTM from the docs perspective.
Proposed commit message
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs