-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
metrics: Use
prometheus
for process metrics
We currently have our own implementation of system level metrics. This is unnecessary. The `prometheus` crate provides a _process_ feature that bundles prometheus's default process-level metrics. This adds a `process_threads` metric. This change also updates the static `proxy_build_info` metric to be exported via the default prometheus registry. This allows us to export this metric from the top-level `linkerd2-proxy` crate so that the build metadata is not inferred from the linkerd-app-core crate (fixing an old TODO). --- Before > # HELP process_start_time_seconds Time that the process started (in seconds since the UNIX epoch) > # TYPE process_start_time_seconds gauge > process_start_time_seconds 1701551542 > # HELP process_uptime_seconds_total Total time since the process started (in seconds) > # TYPE process_uptime_seconds_total counter > process_uptime_seconds_total 1782.137 > # HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. > # TYPE process_cpu_seconds_total counter > process_cpu_seconds_total 0.72 > # HELP process_virtual_memory_bytes Virtual memory size in bytes. > # TYPE process_virtual_memory_bytes gauge > process_virtual_memory_bytes 111042560 > # HELP process_resident_memory_bytes Resident memory size in bytes. > # TYPE process_resident_memory_bytes gauge > process_resident_memory_bytes 33910784 > # HELP process_open_fds Number of open file descriptors. > # TYPE process_open_fds gauge > process_open_fds 28 > # HELP process_max_fds Maximum number of open file descriptors. > # TYPE process_max_fds gauge > process_max_fds 1048576 > # HELP proxy_build_info Proxy build info > # TYPE proxy_build_info gauge > proxy_build_info{version="2.213.0",git_sha="9f7e7ac",profile="release",date="2023-11-16T23:24:26Z",vendor="linkerd"} 1 After: > # HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. > # TYPE process_cpu_seconds_total counter > process_cpu_seconds_total 0 > # HELP process_max_fds Maximum number of open file descriptors. > # TYPE process_max_fds gauge > process_max_fds 1048576 > # HELP process_open_fds Number of open file descriptors. > # TYPE process_open_fds gauge > process_open_fds 24 > # HELP process_resident_memory_bytes Resident memory size in bytes. > # TYPE process_resident_memory_bytes gauge > process_resident_memory_bytes 27656192 > # HELP process_start_time_seconds Start time of the process since unix epoch in seconds. > # TYPE process_start_time_seconds gauge > process_start_time_seconds 1701553218 > # HELP process_threads Number of OS threads in the process. > # TYPE process_threads gauge > process_threads 2 > # HELP process_uptime_seconds_total Total time since the process started (in seconds) > # TYPE process_uptime_seconds_total gauge > process_uptime_seconds_total 9.700919434 > # HELP process_virtual_memory_bytes Virtual memory size in bytes. > # TYPE process_virtual_memory_bytes gauge > process_virtual_memory_bytes 109264896 > # HELP proxy_build_info Proxy build info > # TYPE proxy_build_info gauge > proxy_build_info{date="2023-12-02T21:32:40Z",git_sha="9a4d02c6f",profile="release",vendor="code@ver-sea",version="0.0.0-dev.9a4d02c6f"} 1
- Loading branch information
Showing
26 changed files
with
141 additions
and
427 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.