Open jkroepke opened 1 month ago
Hi, thank you for the proposal! I'm personally not too sure if it's worth the additional complexity if we could alternatively just advise folks to run a separate Alloy cluster that is solely responsible for gathering logs.
If it can be implemented in a simple and clean way then maybe it'd be worth it, but I personally wouldn't want to add too much complexity for it.
I have a couple of ideas how such a feature may work:
Background
Currently, if Grafana Alloy fails to start, no logs are sent to Loki, even if it's configured in the main configuration. If the main configuration contains import.http, the startup fails. Since no logs are sent, an operator has to log in to the virtual machine to diagnose the issue.
Proposal
Early Evaluation of Loki Logging Configuration
If possible, evaluate the Loki logging configuration early during the startup process to ensure logs are sent even if the startup fails.
CLI Flags for Logging Configuration
Add CLI flags to configure logging settings during startup. This approach allows operators to specify logging configurations directly via command line, ensuring logs are captured early in the startup process.
Splitting Core Configuration and Metric Processing Configuration
Split the core configuration from the metric processing configuration. This separation simplifies the configuration and isolates logging settings, making it easier to ensure that logging is properly configured and operational early in the startup process.