Skip to content
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

Make launcher run ID available in knapsack #1706

Open
RebeccaMahany opened this issue May 2, 2024 · 0 comments
Open

Make launcher run ID available in knapsack #1706

RebeccaMahany opened this issue May 2, 2024 · 0 comments

Comments

@RebeccaMahany
Copy link
Contributor

RebeccaMahany commented May 2, 2024

Launcher has a "run ID" that is currently added to all log messages. This run ID is only available inside the multislogger itself, and is created during new multislogger instantiation. We'd like to be able to access this run ID elsewhere, e.g. to report the current run ID up to k2 during startup, so we want to move it into launcher's knapsack. The instantiation of run ID inside multislogger.New also has the side effect that the same launcher run has multiple run IDs across different multisloggers -- for example, Windows event logs and debug.json logs will have different run IDs for the same run. Ideally, each time launcher runs, it should have a singular, unique run ID that it can access from the knapsack.

Notes for implementation:

  • The run ID should be available in the knapsack so that launcher can e.g. report it up to k2 in the future
  • The run ID should change if launcher reloads itself after an autoupdate (see IsLauncherReloadNeededErr, hereabouts), which means every call to runLauncher should get a new run ID
  • The run ID should be applied to both the regular and system multislogger -- i.e., the run ID should be attached to all logs consistently, whether they are in the regular logs (debug.json) or the system logs (the Windows event logs on Windows, /var/log/kolide-k2/launcher-stderr.log on macOS, or journalctl logs on Linux)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant