Skip to content

Commit b37c182

Browse files
committed
improve metrics.py
Signed-off-by: justwph <2732352+wph95@users.noreply.github.com>
1 parent a5edb59 commit b37c182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/ray/util/metrics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import logging
2-
import os
32
import re
43
import warnings
54
from typing import Any, Dict, List, Optional, Tuple, Union
65

6+
from ray._private.ray_constants import env_bool
77
from ray._raylet import (
88
Count as CythonCount,
99
Gauge as CythonGauge,
@@ -198,7 +198,7 @@ def __init__(
198198
if self._discard_metric:
199199
self._metric = None
200200
else:
201-
if os.environ.get("RAY_enable_open_telemetry") == "true":
201+
if env_bool("RAY_enable_open_telemetry", False):
202202
"""
203203
For the new opentelemetry implementation, we'll correctly use Counter
204204
rather than Sum.

0 commit comments

Comments
 (0)