fix(sensor): acknowledge OTLP delivery independently of local capture - #132
Open
barisozbas wants to merge 1 commit into
Open
barisozbas wants to merge 1 commit into
barisozbas wants to merge 1 commit into
Conversation
Summary: Drain bounded log batches and reconcile submitted/exported counts so the SDK queue cannot silently drop large captures. Validate protobuf acknowledgements, including HTTP-success partial rejection, before marking delivery successful. Track successful session snapshots in atomic hash-only destination checkpoints, independently of local JSON files. Retry unacknowledged sessions on a later run; continue sending sensor health even when sessions are already acknowledged. Document at-least-once semantics, credential configuration, and retry limitations. This builds on #131 (which builds on #130). Review and merge in that order; the main-only CI matrix will run after retargeting this PR to main. Test Plan: Synthetic tests exercise queue overflow protection, dropped-record detection, partial collector acknowledgements, retries, checkpoint failures, authentication scope, and health-only runs. No live sessions or collectors are used. Revert Plan: Revert this commit to restore the previous exporter. Hash-only checkpoint files remain harmless and are ignored by the previous version.
barisozbas
marked this pull request as ready for review
September 19, 2026 12:55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drain bounded log batches and reconcile submitted/exported counts so the SDK queue
cannot silently drop large captures. Validate protobuf acknowledgements, including
HTTP-success partial rejection, before marking delivery successful.
Track successful session snapshots in atomic hash-only destination checkpoints,
independently of local JSON files. Retry unacknowledged sessions on a later run;
continue sending sensor health even when sessions are already acknowledged.
Document at-least-once semantics, credential configuration, and retry limitations.
This builds on #131 (which builds on #130). Review and merge in that order; the
main-only CI matrix will run after retargeting this PR to main.
What type of PR is this?
Related issue: None; OTLP delivery reliability.
Why? A full background queue can drop records, while existing local session
files can prevent retries after remote delivery fails. HTTP success alone also
does not mean an OTLP collector accepted every record.
Test Plan
Synthetic tests exercise queue overflow protection, dropped-record detection,
partial collector acknowledgements, retries, checkpoint failures, authentication
scope, and health-only runs. No live sessions or collectors are used.
the following run sends health without resending the acknowledged session.
or requests installed. Ruff, builds, whitespace, and pre-publish validation pass.
Potential risks: Delivery is at least once, not exactly once. Partial collector
rejection can duplicate accepted records on a later run; fix persistent rejection
before rerunning. This is not a persistent payload queue: retries depend on source
sessions still being available and within the configured lookback. Checkpoints
contain only hashes and are bypassed with
--no-save. In-place credential-filerotation requires clearing the destination checkpoint; opaque dynamic HTTP
credential-provider plugins now fail explicitly instead of being silently bypassed.
Native collector deployments and mTLS handshakes were not exercised.
Revert Plan
Revert this commit to restore the previous exporter. Hash-only checkpoint files
remain harmless and are ignored by the previous version.