Skip to content

Commit af391e9

Browse files
committed
[core][stats-die/08] kill metric_defs
Signed-off-by: Cuong Nguyen <[email protected]>
1 parent 3822ce7 commit af391e9

File tree

21 files changed

+6
-106
lines changed

21 files changed

+6
-106
lines changed

doc/source/ray-observability/reference/system-metrics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ Ray exports a number of system metrics, which provide introspection into the sta
3232
- Current number of actors in each state described in `rpc::ActorTableData::ActorState <https://github.com/ray-project/ray/blob/b3799a53dcabd8d1a4d20f22faa98e781b0059c7/src/ray/protobuf/gcs.proto#L79>`. ALIVE has two sub-states: ALIVE_IDLE, and ALIVE_RUNNING_TASKS. An actor is considered ALIVE_IDLE if it is not running any tasks.
3333
* - `ray_resources`
3434
- `Name`, `State`, `instance`
35-
- Logical resource usage for each node of the cluster. Each resource has some quantity that is in either `USED or AVAILABLE state <https://github.com/ray-project/ray/blob/9eab65ed77bdd9907989ecc3e241045954a09cb4/src/ray/stats/metric_defs.cc#L188>`_. The Name label defines the resource name (e.g., CPU, GPU).
35+
- Logical resource usage for each node of the cluster. Each resource has some quantity that is in either USED or AVAILABLE state. The Name label defines the resource name (e.g., CPU, GPU).
3636
* - `ray_object_store_memory`
3737
- `Location`, `ObjectState`, `instance`
38-
- Object store memory usage in bytes, `broken down <https://github.com/ray-project/ray/blob/9eab65ed77bdd9907989ecc3e241045954a09cb4/src/ray/stats/metric_defs.cc#L231>`_ by logical Location (SPILLED, MMAP_DISK, MMAP_SHM, and WORKER_HEAP). Definitions are as follows. SPILLED--Objects that have spilled to disk or a remote Storage solution (for example, AWS S3). The default is the disk. MMAP_DISK--Objects stored on a memory-mapped page on disk. This mode very slow and only happens under severe memory pressure. MMAP_SHM--Objects store on a memory-mapped page in Shared Memory. This mode is the default, in the absence of memory pressure. WORKER_HEAP--Objects, usually smaller, stored in the memory of the Ray Worker process itself. Small objects are stored in the worker heap.
38+
- Object store memory usage in bytes, broken down by logical Location (SPILLED, MMAP_DISK, MMAP_SHM, and WORKER_HEAP). Definitions are as follows. SPILLED--Objects that have spilled to disk or a remote Storage solution (for example, AWS S3). The default is the disk. MMAP_DISK--Objects stored on a memory-mapped page on disk. This mode very slow and only happens under severe memory pressure. MMAP_SHM--Objects store on a memory-mapped page in Shared Memory. This mode is the default, in the absence of memory pressure. WORKER_HEAP--Objects, usually smaller, stored in the memory of the Ray Worker process itself. Small objects are stored in the worker heap.
3939
* - `ray_placement_groups`
4040
- `State`
4141
- Current number of placement groups by state. The State label (e.g., PENDING, CREATED, REMOVED) describes the state of the placement group. See `rpc::PlacementGroupTable <https://github.com/ray-project/ray/blob/e85355b9b593742b4f5cb72cab92051980fa73d3/src/ray/protobuf/gcs.proto#L517>`_ for more information.

python/ray/_private/metrics_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ def collect(self): # pragma: NO COVER
596596
# metrics. The aggregation of histogram metrics from worker
597597
# level to node level is not well defined. In addition, we
598598
# currently have very few histogram metrics in Ray
599-
# (metric_defs.cc) so the impact of them is negligible.
599+
# so the impact of them is negligible.
600600
to_lower_cardinality[metric.name].append(metric)
601601
else:
602602
open_cencus_metrics.append(metric)

python/ray/_private/telemetry/metric_cardinality.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
# Keep in sync with the WorkerIdKey in src/ray/stats/tag_defs.cc
77
WORKER_ID_TAG_KEY = "WorkerId"
8-
# Keep in sync with the NameKey in src/ray/stats/metric_defs.cc
8+
# Keep in sync with the NameKey in src/ray/stats/tag_defs.cc
99
TASK_OR_ACTOR_NAME_TAG_KEY = "Name"
1010
HIGH_CARDINALITY_METRICS_TO_AGGREGATION: Dict[str, Callable[[List[float]], float]] = {
1111
"tasks": lambda values: sum(values),

python/ray/dashboard/modules/metrics/dashboards/default_dashboard_panels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def max_plus_pending(max_resource, pending_resource):
215215
Panel(
216216
id=29,
217217
title="Object Store Memory by Location",
218-
description="Object store memory usage by location. The dotted line indicates the object store memory capacity. This metric can go over the max capacity in case of spillage to disk.\n\nLocation: where the memory was allocated, which is MMAP_SHM or MMAP_DISK to indicate memory-mapped page, SPILLED to indicate spillage to disk, and WORKER_HEAP for objects small enough to be inlined in worker memory. Refer to metric_defs.cc for more information.",
218+
description="Object store memory usage by location. The dotted line indicates the object store memory capacity. This metric can go over the max capacity in case of spillage to disk.\n\nLocation: where the memory was allocated, which is MMAP_SHM or MMAP_DISK to indicate memory-mapped page, SPILLED to indicate spillage to disk, and WORKER_HEAP for objects small enough to be inlined in worker memory.",
219219
unit="bytes",
220220
targets=[
221221
Target(

python/ray/tests/test_metrics_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
except ImportError:
5555
prometheus_client = None
5656

57-
# This list of metrics should be kept in sync with src/ray/stats/metric_defs.h
57+
# This list of metrics should be kept in sync with metric definitions across the codebase
5858
# NOTE: Commented out metrics are not available in this test.
5959
# TODO(Clark): Find ways to trigger commented out metrics in cluster setup.
6060
_METRICS = [

src/ray/core_worker/store_provider/memory_store/memory_store.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#include "ray/common/ray_config.h"
2424
#include "ray/raylet_ipc_client/raylet_ipc_client_interface.h"
25-
#include "ray/stats/metric_defs.h"
2625
#include "ray/stats/tag_defs.h"
2726

2827
namespace ray {

src/ray/gcs/gcs_actor_manager.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include "ray/common/protobuf_utils.h"
2727
#include "ray/common/ray_config.h"
2828
#include "ray/common/task/task_spec.h"
29-
#include "ray/stats/metric_defs.h"
3029
#include "ray/util/logging.h"
3130
#include "ray/util/time.h"
3231

src/ray/gcs/gcs_node_manager.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "ray/observability/ray_event_recorder_interface.h"
3030
#include "ray/pubsub/gcs_publisher.h"
3131
#include "ray/raylet_rpc_client/raylet_client_pool.h"
32-
#include "ray/stats/metric_defs.h"
3332
#include "ray/util/event.h"
3433
#include "src/ray/protobuf/autoscaler.pb.h"
3534
#include "src/ray/protobuf/gcs.pb.h"

src/ray/gcs/gcs_placement_group_manager.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "ray/common/asio/asio_util.h"
2323
#include "ray/common/bundle_spec.h"
2424
#include "ray/common/ray_config.h"
25-
#include "ray/stats/metric_defs.h"
2625
#include "src/ray/protobuf/gcs.pb.h"
2726

2827
namespace ray {

src/ray/gcs/gcs_task_manager.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include "ray/common/ray_config.h"
3030
#include "ray/common/status.h"
3131
#include "ray/gcs/gcs_ray_event_converter.h"
32-
#include "ray/stats/metric_defs.h"
3332

3433
namespace ray {
3534
namespace gcs {

0 commit comments

Comments
 (0)