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

feat(profiling): Distinguish various discard reasons for profiles #1395

Merged

Conversation

Zylphrex
Copy link
Member

@Zylphrex Zylphrex commented Aug 8, 2022

Profiles can be discarded for various reasons. Right now, all discarded profiles
produce an outcome with the same reason. This makes it difficult to track down
why a profile was discarded. This change breaks the invalid outcome into 3
separate reasons to help understand the behaviour better.

  • DiscardReason::ProcessProfile
    • there are syntactic problems with the profile and cannot be parsed
  • DiscardReason::InvalidProfile
    • there are semantic problems with the profile and should not be ingested
  • DiscardReason::Internal
    • something else is going on, and we should look into it

Profiles can be discarded for various reasons. Right now, all discarded profiles
produce an outcome with the same reason. This makes it difficult to track down
why a profile was discarded. This change breaks the invalid outcome into 3
separate reasons to help understand the behaviour better.

- `DiscardReason::ProcessProfile`
	- there are syntactic problems with the profile and cannot be parsed
- `DiscardReason::InvalidProfile`
	- there are semantic problems with the profile and should not be ingested
- `DiscardReason::Internal`
	- something else is going on, and we should look into it
@Zylphrex Zylphrex requested a review from a team as a code owner August 8, 2022 20:17
@Zylphrex Zylphrex requested a review from a team August 8, 2022 20:17
Copy link
Member

@jan-auer jan-auer left a comment

Choose a reason for hiding this comment

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

Same here, please don't deploy before #1394.

@@ -370,6 +370,15 @@ fn outcome_from_parts(field: ClientReportField, reason: &str) -> Result<Outcome,
}
}

pub fn outcome_from_profile_error(err: relay_profiling::ProfileError) -> Outcome {
Copy link
Member

Choose a reason for hiding this comment

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

nit: This function looks like an implementation detail that doesn't have to be part of the public interface.

Suggested change
pub fn outcome_from_profile_error(err: relay_profiling::ProfileError) -> Outcome {
fn outcome_from_profile_error(err: relay_profiling::ProfileError) -> Outcome {

@Zylphrex Zylphrex enabled auto-merge (squash) August 9, 2022 13:39
@Zylphrex Zylphrex merged commit 7077232 into master Aug 9, 2022
@Zylphrex Zylphrex deleted the txiao/feat/distinguish-various-discard-reasons-for-profiles branch August 9, 2022 13:53
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.

None yet

3 participants