Google Cloud has rolled out four observability features for Ray workloads on Google Kubernetes Engine (GKE), aiming to let ML engineers trace a failed or slow distributed job to its root cause without hopping between tools. The company developed the work with Anyscale and the open-source community, across Ray, KubeRay and the managed Ray Operator add-on.
Google said the goal is to answer a recurring question when a Ray job breaks: whether the fault lies in the user’s code, in Kubernetes, or in the hardware underneath.

Kubernetes events in the Ray Dashboard
Starting in Ray 2.56, a new Platform Events tab shows Kubernetes activity next to tasks and actors. Initial support covered RayCluster, RayJob and RayService resources, and Ray 2.58 extends it to individual Pods. Events such as CreatedWorkerPod, FailedScheduling, OOMKilled and Evicted appear on the same timeline as the workload.
Ray stores these as a platform-agnostic PlatformEvent type, which Google said means the same view could later support schedulers such as Slurm. The events also flow through Ray’s standard event pipeline, so they can be exported to an external backend alongside task and actor events. Enabling ingestion requires a few lines of YAML and a small RBAC role.
GPU and host fault forwarding
On GKE, the GPU device plugin already reports critical XID errors as Kubernetes Warning events on the Node, and since GKE 1.36 the event names the specific GPU that faulted. Node-problem-detector reports kernel deadlocks and other host issues in the same way. These events sit on the Node object in the kube-system namespace, which most Ray users cannot read.

KubeRay 1.8 adds a node event forwarder to bridge that gap. When a Node reports a fault, the operator finds the RayCluster resources with Pods on that node and re-emits the event on each, so it appears in the Platform Events tab next to the actor failure it caused. Users choose which sources, reasons and event types to forward, repeated faults are deduplicated, and RBAC for reading Node events is limited to the default and kube-system namespaces.
On-demand JAX profiling on TPUs
From Ray 2.57, users can capture profiler traces from TPU workers through the Ray Dashboard API. A one-line call in a JAX task or actor registers an in-process profiler, after which a single request can profile any TPU worker for a chosen duration while the job keeps running. No redeploy or shell access to the Pod is needed.
The trace is saved in the worker’s Ray session logs and can be opened in TensorBoard’s profile plugin, showing the XLA op timeline, compilation time and TPU utilization. Google suggested comparing a five-second profile of a slow worker with that of a healthy one to spot causes such as recompilation, input pipeline stalls or a straggler host.
On GKE, GKE ML Diagnostics on-demand capture can also target the same workers once enabled on the cluster. Traces then open in managed XProf in the Google Cloud console, with shareable links and faster loading for large multi-host profiles.
Structured logs by default
Previously, GKE sent Ray log lines to Cloud Logging as unparsed strings, with default INFO severity and multi-line tracebacks split across records. Starting with GKE version 1.37.1-gke.1442000, Ray clusters with log collection enabled emit structured JSON logs by default, and the managed Ray Operator parses them.
Fields including job_id, task_id, actor_id, worker_id and node_id become first-class, severity reflects the real log level, and multi-line messages stay in one entry. Users can build logs-based metrics, such as error rate per actor, or run SQL in Log Analytics.
Existing parsers, sinks and alerts keep working, according to Google. The operator respects logging settings users configured themselves, and a single annotation reverts a RayCluster or worker group to plain-text logs without dropping entries.
How to get started
- Enable the Ray Operator add-on with log collection on a GKE cluster running 1.37.1-gke.1442000 or later for structured logs with no manifest changes.
- Turn on platform events in the RayCluster and, on KubeRay 1.8, enable the RayNodeEventForwarder feature gate.
- Follow the JAX profiler guide on a TPU RayJob, and enable ML Diagnostics on the cluster to view traces in managed XProf.
The Ray and KubeRay components are open source, and Google invited feedback through issues in the respective repositories.
Source: Google Cloud Blog

