Skip to content

Commit

Permalink
add new appset metrics (#18961)
Browse files Browse the repository at this point in the history
* add new appset metrics

* Rename 18960.added to 18961.added

* don't test in e2e
  • Loading branch information
steveny91 authored Oct 31, 2024
1 parent a2ccc97 commit 7ea6303
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 5 deletions.
1 change: 1 addition & 0 deletions argocd/changelog.d/18961.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add new Application Set metrics
4 changes: 4 additions & 0 deletions argocd/datadog_checks/argocd/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
'controller_runtime_reconcile_errors': 'reconcile.errors',
'controller_runtime_reconcile_time_seconds': 'reconcile.time_seconds',
'controller_runtime_reconcile': 'runtime.reconcile',
'argocd_appset_info': 'appset.info',
'argocd_appset_reconcile': 'appset.reconcile',
'argocd_appset_owned_applications': 'appset.owned.applications',
'argocd_appset_labels': 'appset.labels',
}

API_SERVER = {
Expand Down
14 changes: 10 additions & 4 deletions argocd/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,16 @@ argocd.app_controller.workqueue.queue.duration.seconds.count,count,,,,The total
argocd.app_controller.workqueue.queue.duration.seconds.sum,count,,,,The sum the of events counted in the workqueue duration histogram,0,argocd,app_controller workqueue queue duration seconds sum,
argocd.app_controller.workqueue.retries.count,count,,,,The total number of retries handled by workqueue,0,argocd,app_controller workqueue retries,
argocd.app_controller.workqueue.unfinished_work.seconds,gauge,,second,,The number of seconds of work that has been done that is in progress and hasn't been observed by `work_duration`. Large values indicate stuck threads. One can deduce the number of stuck threads by observing the rate at which this increases,0,argocd,app_controller workqueue unfinished_work seconds,
argocd.app_controller.workqueue.work.duration.seconds.bucket,count,,second,,The histogram bucket for time in seconds it takes for processing of an item in the workqueue ,0,argocd,app_controller workqueue work duration seconds bucket,
argocd.app_controller.workqueue.work.duration.seconds.count,count,,,,The total number of events in the workqueue item processing duration histogram ,0,argocd,app_controller workqueue work duration seconds count,
argocd.app_controller.workqueue.work.duration.seconds.sum,count,,,,The sum of events in the workqueue item processing duration histogram ,0,argocd,app_controller workqueue work duration seconds sum,
argocd.app_controller.workqueue.work.duration.seconds.bucket,count,,second,,The histogram bucket for time in seconds it takes for processing of an item in the workqueue,0,argocd,app_controller workqueue work duration seconds bucket,
argocd.app_controller.workqueue.work.duration.seconds.count,count,,,,The total number of events in the workqueue item processing duration histogram,0,argocd,app_controller workqueue work duration seconds count,
argocd.app_controller.workqueue.work.duration.seconds.sum,count,,,,The sum of events in the workqueue item processing duration histogram,0,argocd,app_controller workqueue work duration seconds sum,
argocd.appset_controller.active.workers,gauge,,,,Number of currently used workers per controller,0,argocd,appset_controller runtime active workers count,
argocd.appset_controller.appset.info,gauge,,,,Information about Application Sets. It contains labels for the name and namespace of an application set as well as Resource_update_status that reflects the ResourcesUpToDate property,0,argocd,appset_controller appset info,
argocd.appset_controller.appset.labels,gauge,,,,Applicationset labels translated to Prometheus labels. Disabled by default,0,argocd,appset_controller appset info,
argocd.appset_controller.appset.owned.applications,gauge,,,,Number of applications owned by the applicationset. It contains labels for the name and namespace of an applicationset.,0,argocd,appset_controller appset info,
argocd.appset_controller.appset.reconcile.bucket,count,,,,Application reconciliation performance observation counts by histogram buckets. It contains labels for the name and namespace of an applicationset,0,argocd,appset_controller appset info,
argocd.appset_controller.appset.reconcile.count,count,,,,Application reconciliation performance observation counts total. It contains labels for the name and namespace of an applicationset,0,argocd,appset_controller appset info,
argocd.appset_controller.appset.reconcile.sum,count,,,,Application reconciliation performance in seconds total. It contains labels for the name and namespace of an applicationset,0,argocd,appset_controller appset info,
argocd.appset_controller.go.gc.duration.seconds.count,count,,second,,The summary count of garbage collection cycles in the ApplicationSet controller,0,argocd,appset_controller go gc duration seconds count,
argocd.appset_controller.go.gc.duration.seconds.quantile,gauge,,second,,A summary of the pause duration of garbage collection cycles in the ApplicationSet controller,0,argocd,appset_controller go gc duration seconds,
argocd.appset_controller.go.gc.duration.seconds.sum,count,,second,,The sum of the pause duration of garbage collection cycles in the ApplicationSet controller,0,argocd,appset_controller go gc duration seconds sum,
Expand Down Expand Up @@ -228,4 +234,4 @@ argocd.repo_server.redis.request.count,count,,request,,The number of kubernetes
argocd.repo_server.redis.request.duration.seconds.bucket,count,,second,,The Redis requests duration histogram buckets,0,argocd,repo_server redis request duration seconds bucket,
argocd.repo_server.redis.request.duration.seconds.count,count,,second,,The count aggregation of the Redis requests duration histogram,0,argocd,repo_server redis request duration seconds count,
argocd.repo_server.redis.request.duration.seconds.sum,count,,second,,The sum aggregation of the Redis requests duration histogram,0,argocd,repo_server redis request duration seconds sum,
argocd.repo_server.repo.pending.request.total,gauge,,request,, The number of pending requests requiring repository lock,0,argocd,repo_server repo pending request,
argocd.repo_server.repo.pending.request.total,gauge,,request,,The number of pending requests requiring repository lock,0,argocd,repo_server repo pending request,
12 changes: 12 additions & 0 deletions argocd/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,18 @@
appset_controller_gauges = [
'active.workers',
'max.concurrent.reconciles',
'appset.info',
'appset.owned.applications',
'appset.labels',
]

appset_controller_histograms = [
'reconcile.time_seconds.bucket',
'reconcile.time_seconds.count',
'reconcile.time_seconds.sum',
'appset.reconcile.bucket',
'appset.reconcile.count',
'appset.reconcile.sum',
]

api_server_counters = [
Expand Down Expand Up @@ -176,6 +182,12 @@
'argocd.app_controller.app.reconcile.count',
'argocd.app_controller.app.reconcile.sum',
'argocd.app_controller.kubectl.exec.pending',
'argocd.appset_controller.appset.reconcile.bucket',
'argocd.appset_controller.appset.reconcile.count',
'argocd.appset_controller.appset.reconcile.sum',
'argocd.appset_controller.appset.info',
'argocd.appset_controller.appset.owned.applications',
'argocd.appset_controller.appset.labels',
'argocd.appset_controller.reconcile.time_seconds.bucket',
'argocd.appset_controller.reconcile.time_seconds.count',
'argocd.appset_controller.reconcile.time_seconds.sum',
Expand Down
17 changes: 16 additions & 1 deletion argocd/tests/fixtures/appset_controller_metrics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,19 @@ process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP rest_client_requests_total Number of HTTP requests, partitioned by status code, method, and host.
# TYPE rest_client_requests_total counter
rest_client_requests_total{code="200",host="172.20.0.1:443",method="GET"} 3770
rest_client_requests_total{code="404",host="172.20.0.1:443",method="GET"} 1
rest_client_requests_total{code="404",host="172.20.0.1:443",method="GET"} 1
# HELP argocd_appset_labels Manually created
# TYPE argocd_appset_labels gauge
argocd_appset_labels{controller="applicationset"} 0
# HELP argocd_appset_info Manually created
# TYPE argocd_appset_info gauge
argocd_appset_info{controller="applicationset"} 1
# HELP argocd_appset_owned_applications Manually created
# TYPE argocd_appset_owned_applications gauge
argocd_appset_owned_applications{controller="applicationset"} 1
# HELP argocd_appset_reconcile manually created to test parsing
# TYPE argocd_appset_reconcile histogram
argocd_appset_reconcile_bucket{controller="applicationset",le="0.005"} 155
argocd_appset_reconcile_bucket{controller="applicationset",le="+Inf"} 1347
argocd_appset_reconcile_sum{controller="applicationset"} 507.75374146199937
argocd_appset_reconcile_count{controller="applicationset"} 1347

0 comments on commit 7ea6303

Please sign in to comment.