Class SlaDefinition
java.lang.Object
com.nmontytskyi.monitoring.model.SlaDefinition
Holds the Service Level Agreement (SLA) parameters for a microservice.
Can be created from an Sla annotation using from(Sla),
or manually via the Builder. If a service does not define its own SLA,
the default values from defaults() are used.
Stored together with ServiceInfo and used by
AlertEvaluationService to evaluate metric compliance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SlaDefinitiondefaults()Returns an SLA with standard default values for services that have not defined their own agreement.static SlaDefinitionCreates aSlaDefinitionfrom the values of anSlaannotation.
-
Constructor Details
-
SlaDefinition
public SlaDefinition()
-
-
Method Details
-
from
Creates aSlaDefinitionfrom the values of anSlaannotation.- Parameters:
sla- annotation defined on@MonitoredMicroservice- Returns:
- an SLA parameters object
-
defaults
Returns an SLA with standard default values for services that have not defined their own agreement.- Uptime: 99.9%
- Max response time: 1000ms
- Max error rate: 5.0%
-