-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Enable configuration of prometheus metrics namespace #4722
Enable configuration of prometheus metrics namespace #4722
Conversation
I've done a little more housekeeping here.
|
cc @StephanErb @fgebhart this will break your dashboards ;) |
Metrics being renamed in this PR are:
For backward compatibility folks could rename them to use the original names in the scrape config. If I were better at regex I expect you could do this in one rule. - source_labels: [__name__]
regex: 'dask_semaphore_max_leases'
target_label: __name__
replacement: 'semaphore_max_leases'
- source_labels: [__name__]
regex: 'dask_semaphore_active_leases'
target_label: __name__
replacement: 'semaphore_active_leases'
- source_labels: [__name__]
regex: 'dask_semaphore_pending_leases'
target_label: __name__
replacement: 'semaphore_pending_leases'
- source_labels: [__name__]
regex: 'dask_semaphore_acquire'
target_label: __name__
replacement: 'semaphore_acquire'
- source_labels: [__name__]
regex: 'dask_semaphore_release'
target_label: __name__
replacement: 'semaphore_release'
- source_labels: [__name__]
regex: 'dask_semaphore_average_pending_lease_time_s'
target_label: __name__
replacement: 'semaphore_average_pending_lease_time_s' |
CI failures appear related to #4719. This is ready for final review and merge. |
Many thanks for your input here @fjetter. I've updated those two. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @jacobtomlinson . This is really nice
This PR adds the ability to configure the prometheus metric namespace prefix.
All applications should prefix their metrics with a consistent name. In most of our metrics we prefix them with
dask_
but not always.Adding a config option
distributed.dashboard.prometheus.namespace
which defaults todask
(the_
is added automatically) but allows users to override this if they have a system-specific requirement for this.Given there are three collector classes which have had this added it may make sense to base class these and consolidate duplicated code in the future.