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(eap): Use weighted average instead of simple average for calculating average sampling rate #6678

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

davidtsuk
Copy link
Contributor

@davidtsuk davidtsuk commented Dec 16, 2024

Also updating the count column to use sign
Closes https://github.com/getsentry/eap-planning/issues/133

@davidtsuk davidtsuk requested review from a team as code owners December 16, 2024 18:40
get_field_existence_expression(aggregation),
field = attribute_key_to_expression(aggregation.key)
return f.divide(
f.count(field),
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be

sumIf(sign, exists_expression) / sumIf(sign * sampling_weight, exists_expression)

Copy link
Member

Choose a reason for hiding this comment

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

also should probably have a test!

@davidtsuk davidtsuk merged commit d5b949e into master Dec 16, 2024
31 checks passed
@davidtsuk davidtsuk deleted the david/feat/use-weighted-avg-sample-rate branch December 16, 2024 19:46
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