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 minimum traffic threshold to alerts #58

Merged
merged 3 commits into from
Apr 4, 2023
Merged

Conversation

gagbo
Copy link
Member

@gagbo gagbo commented Mar 30, 2023

The minimum traffic threshold defaults to 1 call per minute across all
functions of a SLO, but can be modified in the CLI

Ref: https://github.com/orgs/autometrics-dev/discussions/9

The minimum traffic threshold defaults to 1 call per minute across all
functions of a SLO, but can be modified in the CLI
autometrics-cli/src/sloth.rs Outdated Show resolved Hide resolved
autometrics-cli/src/sloth.rs Outdated Show resolved Hide resolved
@@ -10,6 +10,21 @@ pub struct Arguments {
#[clap(long, default_values = &["90", "95", "99", "99.9"])]
objectives: Vec<String>,

/// Minimum traffic to trigger alerts in events/second.
///
/// If a service (all function sharing the same service name and objective
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't use the term "service" because it might not be a full service and we're kind of avoiding the term elsewhere. Maybe say something more like "An alert will only be fired for an objective if the total traffic to the functions comprising it exceeds the given threshold. This is to avoid alerts firing due to a small number of errors or high latency function calls during periods of low traffic."

Copy link
Member Author

Choose a reason for hiding this comment

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

I struggled to find a word for it, because the functions really need to share the exact same service name and objectives in order to count in the threshold. So if a user has a SLO for "API" that's 99% success rate, and one SLO for "API" that is 90% success rate in the same app, then the calls to the "API/90%" SLO don't count for the threshold of the "API/99%" SLO, and I don't know how to push that warning in the documentation

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to reword this part

autometrics-cli/src/sloth.rs Outdated Show resolved Hide resolved
gagbo and others added 2 commits April 3, 2023 13:15
Co-authored-by: Evan Schwartz <3262610+emschwartz@users.noreply.github.com>
- Reword new argument
- Change unit
@gagbo gagbo merged commit 1ad3bb7 into main Apr 4, 2023
@gagbo gagbo deleted the low_traffic_threshold branch April 4, 2023 10:31
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

2 participants