You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added comprehensive queue metrics for monitoring concurrency system health
- Implemented periodic queue validation to detect and repair inconsistencies
- Enhanced queue manager with validation and repair capabilities
- Updated documentation with new metrics and monitoring guidance
- Improved semaphore implementation with better locking and error handling
- Added test coverage for new queue validation functionality
Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
|`pipelines_as_code_pipelinerun_count`| Counter | Number of pipelineruns created by pipelines-as-code |`provider`, `event-type`, `namespace`, `repository`|
18
+
|`pipelines_as_code_pipelinerun_duration_seconds_sum`| Counter | Number of seconds all pipelineruns have taken in pipelines-as-code |`namespace`, `repository`, `status`, `reason`|
19
+
|`pipelines_as_code_running_pipelineruns_count`| Gauge | Number of running pipelineruns in pipelines-as-code |`namespace`, `repository`|
|`pipelines_as_code_git_provider_api_request_count`| Counter | Number of API requests submitted to git providers |`provider`, `event-type`, `namespace`, `repository`|
19
26
20
27
**Note:** The metric `pipelines_as_code_git_provider_api_request_count`
21
28
is emitted by both the Controller and the Watcher, since both services
@@ -26,3 +33,146 @@ combine both services' metrics. For example, using PromQL:
26
33
-`sum (rate(pac_controller_pipelines_as_code_git_provider_api_request_count[1m]) or rate(pac_watcher_pipelines_as_code_git_provider_api_request_count[1m]))`
27
34
28
35

36
+
37
+
## Queue Concurrency Metrics
38
+
39
+
The following metrics are available for monitoring the concurrency queue system that manages PipelineRun execution:
|`pac_queue_validation_errors_total`| Gauge | Number of queue validation errors per repository |`repository`, `namespace`|
44
+
|`pac_queue_validation_warnings_total`| Gauge | Number of queue validation warnings per repository |`repository`, `namespace`|
45
+
|`pac_queue_repair_operations_total`| Counter | Number of queue repair operations |`repository`, `namespace`, `status`|
46
+
|`pac_queue_state`| Gauge | Current state of concurrency queues |`repository`, `namespace`, `state`|
47
+
|`pac_queue_utilization_percentage`| Gauge | Queue utilization as percentage of concurrency limit |`repository`, `namespace`|
48
+
|`pac_queue_recovery_duration_seconds`| Histogram | Time taken to recover queue state |`repository`, `namespace`|
49
+
50
+
### Queue Metrics Details
51
+
52
+
#### Validation Metrics
53
+
54
+
-**`pac_queue_validation_errors_total`**: Tracks the number of validation errors found during periodic queue consistency checks. High values indicate queue inconsistencies that need attention.
55
+
-**`pac_queue_validation_warnings_total`**: Tracks the number of validation warnings found during periodic queue consistency checks. Warnings indicate potential issues but are less severe than errors.
56
+
57
+
#### Repair Metrics
58
+
59
+
-**`pac_queue_repair_operations_total`**: Counts the number of repair operations performed. The `status` label indicates whether the repair was `success` or `failed`.
60
+
61
+
#### State Metrics
62
+
63
+
-**`pac_queue_state`**: Shows the current state of queues with the following `state` labels:
64
+
-`running`: Number of PipelineRuns currently executing
65
+
-`pending`: Number of PipelineRuns waiting in the queue
66
+
67
+
#### Utilization Metrics
68
+
69
+
-**`pac_queue_utilization_percentage`**: Shows queue utilization as a percentage of the configured concurrency limit. Values close to 100% indicate high queue usage.
70
+
71
+
#### Performance Metrics
72
+
73
+
-**`pac_queue_recovery_duration_seconds`**: Measures the time taken to recover queue state during initialization or repair operations. This helps identify performance issues.
0 commit comments