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

Capture configuration files & runtime config in support bundle #2094

Merged
merged 11 commits into from
Nov 22, 2024

Conversation

dehaansa
Copy link
Contributor

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

#2066

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added

@dehaansa dehaansa requested review from clayton-cornell and a team as code owners November 14, 2024 17:29
@mattdurham
Copy link
Collaborator

Ideally we should replace secret values with a placeholder.

@mattdurham
Copy link
Collaborator

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.

@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Nov 15, 2024
@clayton-cornell clayton-cornell requested a review from a team November 15, 2024 19:16
@dehaansa
Copy link
Contributor Author

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
Copy link
Collaborator

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

@@ -45,8 +45,11 @@ A support bundle contains the following data:
* `alloy-runtime-flags.txt` contains the values of the runtime flags available in {{< param "PRODUCT_NAME" >}}.
* The `pprof/` directory contains Go runtime profiling data (CPU, heap, goroutine, mutex, block profiles) as exported by the pprof package.
Refer to the [profile][profile] documentation for more details on how to use this information.
* The `sources/` directory contains copies of the local configuration files used to configure {{< param "PRODUCT_NAME" >}}.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this include local modules? Totally fine if it doesnt but may want to add a bit more information.

Copy link
Collaborator

@mattdurham mattdurham left a comment

Choose a reason for hiding this comment

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

LGTM, minor documentation question

@mattdurham mattdurham enabled auto-merge (squash) November 22, 2024 18:58
@mattdurham mattdurham merged commit f24aeca into grafana:main Nov 22, 2024
15 checks passed
@dehaansa dehaansa deleted the enh/support-bundle-config-file branch November 22, 2024 20:01
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants