Skip to content

Skip HTTP logs with unparseable timestamps instead of crashing#1

Closed
Sayan- wants to merge 1 commit into
mainfrom
hypeship/http-log-skip-bad-timestamp
Closed

Skip HTTP logs with unparseable timestamps instead of crashing#1
Sayan- wants to merge 1 commit into
mainfrom
hypeship/http-log-skip-bad-timestamp

Conversation

@Sayan-

@Sayan- Sayan- commented Jun 17, 2026

Copy link
Copy Markdown

Summary

getHttpLogs returns a fatal error when a single HTTP log has a missing or non-RFC3339 timestamp. That error propagates up through SubscribeToHttpLogs to main, which calls os.Exit(1) — so one malformed log takes down the entire forwarder. Because the upstream HTTP-log attribute shape can change over time (the README itself warns root attributes "are subject to change"), this is a latent crash-loop: every restart re-reads the same bad log and exits again.

This changes that one path to log-and-skip the offending log and continue, matching how the path and httpStatus attributes in the same loop are already handled.

Why

A production forwarder deployment exited and was restarted by the platform; the process-exit-on-any-subscription-error design means transient or malformed input can drop the whole log pipeline. A single bad timestamp should not be fatal.

Test plan

  • go build ./... passes
  • Verify a log with a missing/bad timestamp attribute is logged and skipped, and forwarding continues for subsequent logs

A single HTTP log with a missing or non-RFC3339 timestamp caused
getHttpLogs to return a fatal error, which propagates to os.Exit and
takes down the whole forwarder. Since the upstream log attribute shape
can change, this turns one malformed log into a crash loop.

Log and skip the offending log instead, matching how the path and status
code attributes in the same loop are already handled.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Sayan- Sayan- force-pushed the hypeship/http-log-skip-bad-timestamp branch from 4e8cf99 to c9126cf Compare June 17, 2026 18:50
@Sayan- Sayan- closed this Jun 23, 2026
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.

1 participant