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

fix(profiling): Warn on invalid JSON errors #1685

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

phacops
Copy link
Contributor

@phacops phacops commented Dec 8, 2022

We'd like the error to be logged but not sent to Sentry as it's high cardinality and not very useful in Sentry.

Changing it to a warn level log seems to log in Cloud Logging but not send anything to Sentry, which is the behavior we'd like to have.

@phacops phacops requested a review from a team as a code owner December 8, 2022 18:47
@phacops phacops requested a review from a team December 8, 2022 18:47
@phacops phacops enabled auto-merge (squash) December 8, 2022 18:55
@@ -3,13 +3,15 @@ use crate::ProfileError;
pub fn discard_reason(err: ProfileError) -> &'static str {
match err {
ProfileError::CannotSerializePayload => "profiling_failed_serialization",
ProfileError::InvalidBase64Value => "profiling_invalid_base64_value",
ProfileError::InvalidJson(_) => "profiling_invalid_json",
Copy link
Member

Choose a reason for hiding this comment

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

We should use the existing discard reasons for this, such as DiscardReason::InvalidJson to keep cardinality of the column overall as low as possible. However, we can also follow up about this.

@phacops phacops merged commit aeab49e into master Dec 8, 2022
@phacops phacops deleted the pierre/profiling-only-warn-on-invalid-json branch December 8, 2022 19:48
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