-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Labels
enhancementNew feature or requestNew feature or request
Description
A number of people have described use cases where the details of an SLO may be different for different instances of the same service. For example, a service that has specific instances for each geographical region, where each has its own SLO.
The main thing we would need to change in order to support this would be to make the Objective
details use String
s instead of &'static str
s and the methods would need to be non-const
(this would be a breaking change). Then, you'd be able to define an objective like this:
use std::{env, cell::LazyCell};
static OBJECTIVE: LazyCell<Objective> = LazyCell::new(|| {
Objective::new(env::var("OBJECTIVE_NAME").unwrap())
.success_rate(env::var("OBJECTIVE_PERCENTILE").unwrap())
});
We could potentially add helper functions for loading the values from environment variables, or we could just show how to do this in the docs.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request