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

Add open telemetry metric and warning log for negative variance case. #1865

Open
ple13 opened this issue Oct 16, 2024 · 0 comments
Open

Add open telemetry metric and warning log for negative variance case. #1865

ple13 opened this issue Oct 16, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ple13
Copy link
Contributor

ple13 commented Oct 16, 2024

Issue:
In the reach and frequency protocol, calculated variance values can sometimes be negative due to rounding errors or approximations in the computation. While mathematically, variance should always be non-negative, these small negative values can arise.

Current Solution:
To address this, functions that compute variance currently return max(0.0, variance). This ensures non-negativity and maintains consistency in metric calculations. However, it can mask potentially significant issues when the variance has an unreasonably large negative value.

Proposed Improvements:
Logging: Whenever a negative variance is encountered, the value should be logged. This helps in identifying and diagnosing potential problems.
Threshold: Establish a threshold for acceptable negative variance values. If a calculated variance falls outside the threshold, it should trigger an alert or warning, indicating a potential issue that requires further investigation.

@ple13 ple13 added the enhancement New feature or request label Oct 16, 2024
@ple13 ple13 self-assigned this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant