grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.45k stars 216 forks source link

Capture configuration files & runtime config in support bundle #2094

Closed dehaansa closed 3 days ago

dehaansa commented 1 week ago

PR Description

Add configuration sources (local file & remote config) to the support bundle.

One thing that requires consideration -- this is not currently doing any redaction of the configuration files, should we make this opt-in/opt-out rather than always collected?

Which issue(s) this PR fixes

https://github.com/grafana/alloy/issues/2066

Notes to the Reviewer

PR Checklist

mattdurham commented 1 week ago

Ideally we should replace secret values with a placeholder.

mattdurham commented 1 week ago

In the old agent one we used a custom yaml marshaller to redact the secrets, I feel we need to also redact the values here.

dehaansa commented 1 week ago

Implemented a POC of redacting secrets in the AST & printer, but I need to consider how it affects the fmt command and other uses of printer.

mattdurham commented 1 week ago

Looks reasonable but would like to see some tests around and if we need to make the behavior configurable.