aboutsummaryrefslogtreecommitdiffstats
path: root/metrics/src/main/java/ai/vespa/metrics/set/BasicMetricSets.java
blob: f46ac0d04e5b9ac29f5b91493f4070c54b02d12d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.metrics.set;

import ai.vespa.metrics.ContainerMetrics;

/**
 * Defines metric sets that are meant to be used as building blocks for other metric sets.
 *
 * @author gjoranv
 */
public class BasicMetricSets {

    static MetricSet containerHttpStatusMetrics() {
        return new MetricSet.Builder("basic-container-http-status")
                .metric(ContainerMetrics.HTTP_STATUS_1XX.rate())

                .metric(ContainerMetrics.HTTP_STATUS_2XX.rate())
                .metric(ContainerMetrics.HTTP_STATUS_3XX.rate())
                .metric(ContainerMetrics.HTTP_STATUS_4XX.rate())
                .metric(ContainerMetrics.HTTP_STATUS_5XX.rate())
                .build();
    }

}