Skip to content

Tell collector to watch the .log.1 files to avoid missing records aro… #4135

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

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

dsessler7
Copy link
Contributor

…und rotation time.

Add comments around each components filelog receiver settings.

Checklist:

  • Have you added an explanation of what your changes do and why you'd like them to be included?
  • Have you updated or added documentation for the change, as applicable?
  • Have you tested your changes on all related environments with successful results, as applicable?
    • Have you added automated tests?

Type of Changes:

  • New feature
  • Bug fix
  • Documentation
  • Testing enhancement
  • Other

What is the current behavior (link to any open issues here)?

What is the new behavior (if this is a feature change)?

  • Breaking change (fix or feature that would cause existing functionality to change)

Other Information:

Copy link
Contributor

@benjaminjb benjaminjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers, LG

// record or two to the old file while rotation is occurring. The
// collector knows not to create duplicate logs.
"include": []string{
directory + "/*.log", directory + "/*.log.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think extra security here is fine, though I think Patroni's filehandler inherits the Python rotating behavior: queue a log to emit; check if you have to rotate; rotate if necessary; finish emitting the log.

…und rotation time.

Add comments around each components filelog receiver settings.
@dsessler7 dsessler7 enabled auto-merge (rebase) March 18, 2025 18:49
@dsessler7 dsessler7 merged commit 0ac75da into CrunchyData:main Mar 18, 2025
19 checks passed
@dsessler7 dsessler7 deleted the watch-rotated-log branch March 18, 2025 18:51
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