Skip to content

Add detailed context to stream-end log messages#3890

Open
Lazydayz137 wants to merge 1 commit intolivepeer:masterfrom
Lazydayz137:fix/2641-detailed-stream-end-logging
Open

Add detailed context to stream-end log messages#3890
Lazydayz137 wants to merge 1 commit intolivepeer:masterfrom
Lazydayz137:fix/2641-detailed-stream-end-logging

Conversation

@Lazydayz137
Copy link
Copy Markdown

What does this pull request do?

Replaces the generic "Segment loop timed out; closing" log message with context-specific messages that help operators diagnose why a transcoding session ended.

Specific updates

  • Track segment count and last-received timestamp in transcodeSegmentLoop
  • Log distinct messages for: timeout with zero segments, timeout after segments received (with count and idle duration), channel closed by broadcaster
  • Elevate timeout messages from DEBUG to INFO level

How did you test each of these updates?

  • go test ./core/... passes
  • go vet ./core/... clean
  • gofmt clean

Does this pull request close any open issues?

Fixes #2641

Checklist

  • I have read the contribution guide
  • make and tests run successfully
  • Code is formatted with gofmt

Replace the generic "Segment loop timed out; closing" message with
context-conditional messages that distinguish between:
- Timeout with no segments received (broadcaster never started sending)
- Timeout after segments were received (stream ended, includes count
  and idle duration)
- Channel closed by broadcaster (explicit session end)

Also elevate timeout messages from DEBUG to INFO level since stream
endings are operationally relevant events.

Fixes livepeer#2641

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the go Pull requests that update Go code label Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go Pull requests that update Go code

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Add detail to log when a stream ends

1 participant