-
Notifications
You must be signed in to change notification settings - Fork 368
Add db and vital metrics for clock and deployment_updater #4749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f87b5f0 to
d98d35c
Compare
This change allows the export of database connection pool metrics and vital metrics for the `cloud_controller_clock` and `cc_deployment_updater` processes via prometheus. This required some bigger changes: - Metrics Infrastructure: - Add `ExecutionContext` class to manage process type identification and rake context setup across all CAPI processes - Add `StandaloneMetricsWebserver` for non-API processes (clock, deployment_updater, cc-worker) with automatic TLS configuration - Refactor `PrometheusUpdater` to register metrics based on execution context, avoiding unnecessary metric registration - Consolidate `PrometheusUpdater` instances (remove separate `cc_worker_prometheus_updater`) - Clock & Deployment Updater Configuration: - Add `publish_metrics` config option to enable/disable metrics publishing - Add `prometheus_port` config option (default: 9394 for clock, 9395 for deployment_updater) - Initialize metrics webserver and periodic vital updates when metrics publishing is enabled - Metric Improvements: - Refactor `PeriodicUpdater` to support configurable task lists (enables vitals-only updates for clock, deployment_updater, cc-worker) - Code Organization - Rename `MetricsWebserver` to `ApiMetricsWebserver` for clarity - Update all rake tasks to set execution context via `ExecutionContext` API - Update DB connection metrics initialization to use `ExecutionContext` - Update existing specs to work with new execution context
d98d35c to
3e1646d
Compare
10 tasks
philippthun
reviewed
Jan 15, 2026
spec/unit/lib/cloud_controller/deployment_updater/scheduler_spec.rb
Outdated
Show resolved
Hide resolved
spec/unit/lib/cloud_controller/metrics/prometheus_updater_spec.rb
Outdated
Show resolved
Hide resolved
spec/unit/lib/cloud_controller/metrics/prometheus_updater_spec.rb
Outdated
Show resolved
Hide resolved
philippthun
approved these changes
Jan 15, 2026
3 tasks
ari-wg-gitbot
added a commit
to cloudfoundry/capi-release
that referenced
this pull request
Jan 16, 2026
Changes in cloud_controller_ng:
- Add db and vital metrics for clock and deployment_updater
PR: cloudfoundry/cloud_controller_ng#4749
Author: Johannes Haass <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows the export of database connection pool metrics and vital metrics for the
cloud_controller_clockandcc_deployment_updaterprocesses via prometheus.This required some bigger changes:
Metrics Infrastructure
ExecutionContextclass to manage process type identification and rake context setup across all CAPI processesStandaloneMetricsWebserverfor non-API processes (clock, deployment_updater, cc-worker) with automatic TLS configurationPrometheusUpdaterto register metrics based on execution context, avoiding unnecessary metric registrationPrometheusUpdaterinstances (remove separatecc_worker_prometheus_updater)Clock & Deployment Updater Configuration:
publish_metricsconfig option to enable/disable metrics publishingprometheus_portconfig option (default: 9394 for clock, 9395 for deployment_updater)Metric Improvements:
process_typeandpidlabels to vital metrics for process identificationprocess_typelabel to DB connection pool metricsPeriodicUpdaterto support configurable task lists (enables vitals-only updates for clock, deployment_updater, cc-worker)Code Organization
MetricsWebservertoApiMetricsWebserverfor clarityExecutionContextAPIExecutionContextLinks to any other associated PRs
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests