Skip to content

fix: drop negative samples #3955

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

Merged
merged 1 commit into from
Feb 27, 2025
Merged

fix: drop negative samples #3955

merged 1 commit into from
Feb 27, 2025

Conversation

kolesnikovae
Copy link
Collaborator

@kolesnikovae kolesnikovae commented Feb 27, 2025

Addresses #3939 #2285

@kolesnikovae kolesnikovae marked this pull request as ready for review February 27, 2025 12:48
@kolesnikovae kolesnikovae requested a review from a team as a code owner February 27, 2025 12:48
Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM

p.Sample = slices.RemoveInPlace(p.Sample, func(s *profilev1.Sample, i int) bool {
for j := 0; j < len(s.Value); j++ {
if s.Value[j] < 0 {
removedSamples = append(removedSamples, s)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a metric might be helpful in order to tell us if this still happens or not?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do that in a separate PR

@simonswine simonswine merged commit e94b44e into main Feb 27, 2025
21 checks passed
@simonswine simonswine deleted the fix/negative-samples branch February 27, 2025 13:43
simonswine pushed a commit that referenced this pull request Feb 27, 2025
shelldandy pushed a commit to shelldandy/pyroscope that referenced this pull request Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants