Skip to content

[client] Add systemd netbird logs to debug bundle #3917

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 5 commits into from
Jun 5, 2025
Merged

Conversation

lixmal
Copy link
Contributor

@lixmal lixmal commented Jun 3, 2025

Describe your changes

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

@Copilot Copilot AI review requested due to automatic review settings June 3, 2025 11:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the debug bundle by adding support for collecting systemd journal logs. Key changes include:

  • Adding trySystemdLogFallback functions for both Linux and non-Linux environments.
  • Implementing detailed journal log collection in the Linux debug file with service name resolution and log anonymization.
  • Updating the archive creation logic to conditionally add log files or fallback systemd logs.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
client/internal/debug/debug_nonlinux.go Added stub function for systemd log fallback on non-Linux systems
client/internal/debug/debug_linux.go Introduced robust systemd journal log collection with timeout, error handling, and anonymization
client/internal/debug/debug.go Updated log file condition to optionally trigger systemd log fallback

Copy link

sonarqubecloud bot commented Jun 5, 2025

@lixmal lixmal merged commit 8435495 into main Jun 5, 2025
32 checks passed
@lixmal lixmal deleted the systemd-logs branch June 5, 2025 11:54
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.

3 participants