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

Exclude error from successful analytics #704

Merged
merged 3 commits into from Oct 27, 2022
Merged

Exclude error from successful analytics #704

merged 3 commits into from Oct 27, 2022

Conversation

0x2b3bfa0
Copy link
Member

Closes #703; @casperdcl invenit

@0x2b3bfa0 0x2b3bfa0 added the bug Something isn't working label Oct 26, 2022
@0x2b3bfa0 0x2b3bfa0 requested a review from a team October 26, 2022 17:48
@0x2b3bfa0 0x2b3bfa0 self-assigned this Oct 26, 2022
"extra": extra,
}

if e != nil {
payload["error"] = reflect.TypeOf(e).String()
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we including the string representation of the error's type here? Is that the intent?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, the goal is providing some information about the error type but not exfiltrating sensitive information

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, that would be an absolutely brilliant comment to add at line 352 :)

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like we have some brilliant review comments at #493 (comment) 😄

Copy link
Member Author

@0x2b3bfa0 0x2b3bfa0 Oct 26, 2022

Choose a reason for hiding this comment

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

Suggested change
payload["error"] = reflect.TypeOf(e).String()
// Get the type of the error as a string, but not the error message itself, because it can be sensitive.
payload["error"] = reflect.TypeOf(e).String()

Copy link
Contributor

Choose a reason for hiding this comment

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

couldn't resist

Suggested change
payload["error"] = reflect.TypeOf(e).String()
// only use error type (not message) to avoid potentially sensitive info
payload["error"] = reflect.TypeOf(e).String()

Copy link
Contributor

@tasdomas tasdomas left a comment

Choose a reason for hiding this comment

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

Please add a comment to clarify handling of the error field in the payload.

"extra": extra,
}

if e != nil {
payload["error"] = reflect.TypeOf(e).String()
Copy link
Contributor

Choose a reason for hiding this comment

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

ah, that would be an absolutely brilliant comment to add at line 352 :)

dacbd and others added 2 commits October 27, 2022 11:05
Co-authored-by: Helio Machado <0x2b3bfa0+git@googlemail.com>
@dacbd dacbd self-requested a review October 27, 2022 18:07
@dacbd dacbd enabled auto-merge (squash) October 27, 2022 18:08
@dacbd dacbd merged commit 0446fc7 into master Oct 27, 2022
@dacbd dacbd deleted the err branch October 27, 2022 18:12
@casperdcl casperdcl added the technical-debt Refactoring, linting & tidying label Oct 28, 2022
0x2b3bfa0 added a commit that referenced this pull request Oct 28, 2022
@0x2b3bfa0 0x2b3bfa0 mentioned this pull request Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working technical-debt Refactoring, linting & tidying
Projects
None yet
Development

Successfully merging this pull request may close these issues.

telemetry: remove unnecessary error from payload
4 participants