Skip to content

Commit c7ae9e8

Browse files
authored
Merge pull request #209 from ruromero/slo
feat: add slo metrics
2 parents 8013c05 + aeddabc commit c7ae9e8

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/main/java/com/redhat/exhort/config/metrics/CustomMetrics.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public class CustomMetrics {
3535
private static final String CAMEL_ROUTES_METRIC = "camel.route.policy";
3636
private static final String ROUTE_ID_TAG = "routeId";
3737

38+
private static final double SECOND = 1000000000.0;
39+
3840
private static final Collection<String> MONITORED_ROUTES =
3941
List.of(
4042
"snykValidateToken",
@@ -54,8 +56,18 @@ public DistributionStatisticConfig configure(Id id, DistributionStatisticConfig
5456
if (requiresHistogram(id)) {
5557
return DistributionStatisticConfig.builder()
5658
.percentiles(0.90, 0.95, 0.99)
57-
.percentilesHistogram(Boolean.TRUE)
58-
.serviceLevelObjectives()
59+
.percentilesHistogram(Boolean.FALSE)
60+
.serviceLevelObjectives(
61+
0.01 * SECOND,
62+
0.025 * SECOND,
63+
0.05 * SECOND,
64+
0.1 * SECOND,
65+
0.25 * SECOND,
66+
0.5 * SECOND,
67+
1 * SECOND,
68+
2.5 * SECOND,
69+
5 * SECOND,
70+
10 * SECOND)
5971
.build()
6072
.merge(config);
6173
}

0 commit comments

Comments
 (0)