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
* Publish cc-worker metrics
Implemented a small puma webserver, which will be started in a separate thread with the first worker process.
Using the exporter middleware provided by the prometheus client, the metrics stored in the registry will be published under `/metrics`.
All processes use the same DirectFileStore registry, so that metrics can be published in a single webserver.
* Turn off publishing metrics by default and make configurable
* Use worker process index as pid for metrics store
* Fix code style and unit tests
* Make metrics endpoint only available on localhost
# only add the metrics for api processes. Otherwise e.g. rake db:migrate would also initialize metric updaters, which need additional config
75
-
returnifObject.const_defined?(:RakeConfig)
74
+
# only add the metrics for api and cc-worker processes. Otherwise e.g. rake db:migrate would also initialize metric updaters, which need additional config
{type: :gauge,name: :cc_running_tasks_memory_bytes,docstring: 'Total memory consumed by running tasks',aggregation: :most_recent},
38
38
{type: :gauge,name: :cc_users_total,docstring: 'Number of users',aggregation: :most_recent},
39
-
{type: :gauge,name: :cc_deployments_in_progress_total,docstring: 'Number of in progress deployments',aggregation: :most_recent},
40
-
{type: :gauge,name: :cc_acquired_db_connections_total,labels: %i[process_type],docstring: 'Number of acquired DB connections'},
41
-
{type: :histogram,name: :cc_db_connection_hold_duration_seconds,docstring: 'The time threads were holding DB connections',buckets: CONNECTION_DURATION_BUCKETS},
42
-
# cc_connection_pool_timeouts_total must be a gauge metric, because otherwise we cannot match them with processes
{type: :gauge,name: :cc_acquired_db_connections_total,labels: %i[process_type],docstring: 'Number of acquired DB connections'},
60
+
{type: :histogram,name: :cc_db_connection_hold_duration_seconds,docstring: 'The time threads were holding DB connections',buckets: CONNECTION_DURATION_BUCKETS},
61
+
# cc_connection_pool_timeouts_total must be a gauge metric, because otherwise we cannot match them with processes
0 commit comments