Skip to content

Fix loki.source.docker only starting log collection for containers in running state #3449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

RasEza
Copy link

@RasEza RasEza commented Apr 25, 2025

PR Description

Due to the change in #742 loki.source.docker is no longer able to begin log collection for containers that only briefly have the "running" container state. This means that transient, short-lived or quickly restarting containers may never have their logs collected.

This fix removes the condition that target containers must be in the "running" state for the StartIfNotRunning function to be called. Additionally it completely removes a redundant container inspection that is also done by in the processLoop function which is called by StartIfNotRunning.

Which issue(s) this PR fixes

Fixes #3408

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Tests updated

@RasEza RasEza requested a review from a team as a code owner April 25, 2025 11:22
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.

loki.source.docker will not start collecting logs from containers not in the "running" state
1 participant