Skip to content

senders: fix blocking logs on missing 'timestamp' field in rsyslog and ES/OS senders#186

Merged
ngilles-aiven merged 1 commit intomasterfrom
dogukancagatay/fix-blocking-logs-on-missing-timestamp-fields
Mar 10, 2026
Merged

senders: fix blocking logs on missing 'timestamp' field in rsyslog and ES/OS senders#186
ngilles-aiven merged 1 commit intomasterfrom
dogukancagatay/fix-blocking-logs-on-missing-timestamp-fields

Conversation

@dogukancagatay
Copy link
Contributor

Messages can lack a 'timestamp' field when a field filter whitelist
strips it, or when _truncate_long_message replaces an oversized entry
with an error stub. The rsyslog and elasticsearch/opensearch senders
accessed message["timestamp"] with a hard dict lookup, causing a
KeyError that was caught by the broad exception handler and retried
indefinitely — blocking log delivery for the affected integration.

Fix by using a fallback to the current UTC time in both senders,
and by preserving the timestamp in _truncate_long_message
so truncated entries remain well-formed for downstream senders.

@dogukancagatay dogukancagatay requested a review from a team March 10, 2026 12:07
@dogukancagatay dogukancagatay marked this pull request as ready for review March 10, 2026 12:07
…d ES/OS senders

Messages can lack a 'timestamp' field when a field filter whitelist
strips it, or when `_truncate_long_message` replaces an oversized entry
with an error stub. The rsyslog and elasticsearch/opensearch senders
accessed `message["timestamp"]` with a hard dict lookup, causing a
KeyError that was caught by the broad exception handler and retried
indefinitely — blocking log delivery for the affected integration.

Fix by using a fallback to the current UTC time in both senders,
and by preserving the timestamp in `_truncate_long_message`
so truncated entries remain well-formed for downstream senders.
@dogukancagatay dogukancagatay force-pushed the dogukancagatay/fix-blocking-logs-on-missing-timestamp-fields branch from 6822885 to 19b111b Compare March 10, 2026 13:56
@ngilles-aiven ngilles-aiven merged commit 6098147 into master Mar 10, 2026
6 checks passed
@ngilles-aiven ngilles-aiven deleted the dogukancagatay/fix-blocking-logs-on-missing-timestamp-fields branch March 10, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants