Skip to content

Commit 5851413

Browse files
authored
fix: address a minor issue in the comments (#65)
* Minor fixes Signed-off-by: michaelawyu <[email protected]> * Minor fixes Signed-off-by: michaelawyu <[email protected]> --------- Signed-off-by: michaelawyu <[email protected]>
1 parent 6c0dde2 commit 5851413

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

pkg/controllers/workapplier/metrics.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
)
3030

3131
// Note (chenyu1):
32-
// the metrics for the work applier are added the assumptions that:
32+
// the metrics for the work applier are added under the assumptions that:
3333
// a) the applier should provide low-cardinality metrics only to keep the memory footprint low,
3434
// as there might be a high number (up to 10K) of works/manifests to process in a member cluster; and
3535
// b) keep the overhead of metrics collection low, esp. considering that the applier runs in
@@ -47,6 +47,8 @@ const (
4747
manifestDriftOrDiffDetectionStatusNotFound = "NotFound"
4848
)
4949

50+
// trackWorkAndManifestProcessingRequestMetrics tracks the work and manifest processing request metrics.
51+
// It is called right after the status of the work is refreshed.
5052
func trackWorkAndManifestProcessingRequestMetrics(work *fleetv1beta1.Work) {
5153
// Increment the work processing request counter.
5254

pkg/metrics/metrics.go

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,18 @@ var (
9393
// total number of work object processing requests.
9494
//
9595
// The following labels are available:
96-
// * apply_status: the apply status of the processing request; values can
97-
// be "applied", "failed", or "skipped".
96+
// * apply_status: the apply status of the processing request; see the list of
97+
// work apply condition reasons in the work applier source code
98+
// (pkg/controller/workapplier/controller.go) for possible values.
99+
// if the work object does not need to be applied, the value is "Skipped".
98100
// * availability_status: the availability check status of the processing request;
99-
// values can be "available", "unavailable", or "skipped".
101+
// see the list of availability check condition reasons in the work applier source
102+
// code (pkg/controller/workapplier/controller.go) for possible values.
103+
// if the work object does not need an availability check, the value is "Skipped".
100104
// * diff_reporting_status: the diff reporting status of the processing request;
101-
// values can be "reported", "failed", or "skipped".
105+
// see the list of diff reporting condition reasons in the work applier source
106+
// code (pkg/controller/workapplier/controller.go) for possible values.
107+
// if the work object does not need a diff reporting, the value is "Skipped".
102108
FleetWorkProcessingRequestsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
103109
Name: "fleet_work_processing_requests_total",
104110
Help: "Total number of processing requests of work objects, including retries and periodic checks",
@@ -110,16 +116,19 @@ var (
110116
// The following labels are available:
111117
// * apply_status: the apply status of the processing request; see the list of
112118
// apply result types in the work applier source code for possible values.
119+
// if the manifest object does not need to be applied, the value is "Skipped".
113120
// * availability_status: the availability check status of the processing request;
114121
// see the list of availability check result types in the work applier source code
115122
// for possible values.
123+
// if the manifest object does not need an availability check, the value is "Skipped".
116124
// * diff_reporting_status: the diff reporting status of the processing request;
117125
// see the list of diff reporting result types in the work applier source code
118126
// for possible values.
127+
// if the manifest object does not need a diff reporting, the value is "Skipped".
119128
// * drift_detection_status: the drift detection status of the processing request;
120-
// values can be "found" and "not_found".
129+
// values can be "Found" and "NotFound".
121130
// * diff_detection_status: the diff detection status of the processing request;
122-
// values can be "found" and "not_found".
131+
// values can be "Found" and "NotFound".
123132
FleetManifestProcessingRequestsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
124133
Name: "fleet_manifest_processing_requests_total",
125134
Help: "Total number of processing requests of manifest objects, including retries and periodic checks",

0 commit comments

Comments
 (0)