mirror of
https://github.com/wassname/ray.git
synced 2026-07-20 12:40:20 +08:00
[Metric] custom metrics refinement (#10861)
* In progress * In Progress. * Addressed code review. * Add unit tests. * Add a simple doc. * Fixed test failure. * Fix all test failures from serve. * Addressed code review.
This commit is contained in:
@@ -167,6 +167,35 @@ get_current_placement_group
|
||||
|
||||
.. autofunction:: ray.util.placement_group.get_current_placement_group
|
||||
|
||||
.. _custom-metric-api-ref:
|
||||
|
||||
Custom Metrics APIs
|
||||
-------------------
|
||||
|
||||
Metric
|
||||
~~~~~~
|
||||
|
||||
.. autoclass:: ray.util.metrics.Metric
|
||||
:members:
|
||||
|
||||
Count
|
||||
~~~~~
|
||||
|
||||
.. autoclass:: ray.util.metrics.Count
|
||||
:members:
|
||||
|
||||
Gauge
|
||||
~~~~~
|
||||
|
||||
.. autoclass:: ray.util.metrics.Gauge
|
||||
:members:
|
||||
|
||||
Histogram
|
||||
~~~~~~~~~
|
||||
|
||||
.. autoclass:: ray.util.metrics.Histogram
|
||||
:members:
|
||||
|
||||
Experimental APIs
|
||||
-----------------
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Ray Monitoring with Prometheus
|
||||
==============================
|
||||
Ray Monitoring
|
||||
==============
|
||||
To help monitoring Ray applications, Ray
|
||||
|
||||
- Collects Ray's pre-selected system level metrics.
|
||||
- Exposes metrics in a Prometheus format. We'll call the endpoint to access these metrics a Prometheus endpoint.
|
||||
- Support custom metrics APIs that resemble Prometheus `metric types <https://prometheus.io/docs/concepts/metric_types/>`_.
|
||||
|
||||
This page describes how to acces these metrics using Prometheus.
|
||||
|
||||
@@ -151,3 +152,11 @@ Now, modify a Prometheus config to scrape the file for service discovery.
|
||||
- '/tmp/ray/prom_metrics_service_discovery.json'
|
||||
|
||||
Prometheus will automatically detect that the file contents are changing and update addresses it scrapes to based on the service discovery file generated by Ray.
|
||||
|
||||
Custom Metrics
|
||||
--------------
|
||||
Ray supports custom metrics APIs to enable developers to have visibility to their applications.
|
||||
|
||||
It current supports 3 metric types. All metric types have the same definition as `Prometheus metric types <https://prometheus.io/docs/concepts/metric_types/>`_.
|
||||
|
||||
:ref:`Custom Metrics APIs Package Reference <custom-metric-api-ref>`
|
||||
Reference in New Issue
Block a user