Skip to content

Fix agent not logging collector logs to stdout by default in containers#1757

Open
karensantana wants to merge 2 commits into
mainfrom
fix-collector-logs-for-containers
Open

Fix agent not logging collector logs to stdout by default in containers#1757
karensantana wants to merge 2 commits into
mainfrom
fix-collector-logs-for-containers

Conversation

@karensantana

Copy link
Copy Markdown
Contributor

Proposed changes

When running in a container the agent collector logs are being written to disk instead of stdout. This change fixes this behavior so if a path is not specified in the config, stdout is used by default in containers.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@karensantana karensantana requested a review from a team as a code owner June 25, 2026 08:50
@github-actions github-actions Bot added bug Something isn't working chore Pull requests for routine tasks dependencies labels Jun 25, 2026
@codecov

codecov Bot commented Jun 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 42.85714% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.87%. Comparing base (25415cb) to head (ffd2988).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
internal/config/config.go 42.85% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1757   +/-   ##
=======================================
  Coverage   84.86%   84.87%           
=======================================
  Files         105      105           
  Lines       13632    13634    +2     
=======================================
+ Hits        11569    11572    +3     
+ Misses       1540     1537    -3     
- Partials      523      525    +2     
Files with missing lines Coverage Δ
internal/config/defaults.go 100.00% <ø> (ø)
internal/config/config.go 87.86% <42.85%> (+0.02%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 25415cb...ffd2988. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@craigell

Copy link
Copy Markdown
Contributor

Think we can append a integration test for this in an existing suite since we use containers for testing.

@karensantana

Copy link
Copy Markdown
Contributor Author

Think we can append a integration test for this in an existing suite since we use containers for testing.

Perfect, I'll add that. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chore Pull requests for routine tasks dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants