Annotation Interface Sla
Defines the Service Level Agreement (SLA) for a microservice.
Used exclusively as an attribute of the @MonitoredMicroservice annotation.
The monitoring system automatically calculates SLA compliance over different
time windows (hour, day, week, month) and records breaches.
Usage example:
@MonitoredMicroservice(
name = "order-service",
sla = @Sla(
uptimePercent = 99.9,
maxResponseTimeMs = 300,
maxErrorRatePercent = 1.0,
description = "Production SLA for order processing"
)
)
@SpringBootApplication
public class OrderServiceApplication { ... }
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionHuman-readable description of the agreement shown in reports.doubleMaximum allowed error rate as a percentage of total requests.longMaximum allowed average response time in milliseconds.doubleMinimum required uptime percentage.
-
Element Details
-
uptimePercent
double uptimePercentMinimum required uptime percentage. Defaults to 99.9% (three nines).- Default:
99.9
-
maxResponseTimeMs
long maxResponseTimeMsMaximum allowed average response time in milliseconds. Defaults to 1000ms.- Default:
1000L
-
maxErrorRatePercent
double maxErrorRatePercentMaximum allowed error rate as a percentage of total requests. Defaults to 5.0%.- Default:
5.0
-
description
-