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

apmsoak: log parsed config #166

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

apmsoak: log parsed config #166

wants to merge 3 commits into from

Conversation

endorama
Copy link
Member

@endorama endorama commented Oct 4, 2024

Print parsed configs in debug logs to help with debugging misbehaviours.

Sensitive values are partially redacted to help with debugging without
disclosing full information.

Sensitive values are partially redacted to help with debugging without
disclosing full information.
@endorama endorama requested a review from a team as a code owner October 4, 2024 15:36
1pkg
1pkg previously approved these changes Oct 4, 2024
e.AddString("scenario", r.Scenario)
e.AddString("scenarios_path", r.ScenariosPath)
e.AddString("server_url", r.ServerURL)
e.AddString("secret_token", r.SecretToken)
Copy link
Member

Choose a reason for hiding this comment

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

issue: we might want to redact the secret token too

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching it! Fixed in dadce87

// It handles empty string by returning a fixed value: EMPTY.
func redact(v string) string {
redacted := "EMPTY"
if v != "" {
Copy link
Member

@1pkg 1pkg Nov 4, 2024

Choose a reason for hiding this comment

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

nit: should also check for len(v) > 4

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