Skip to content

Commit 8a4bfea

Browse files
[tracing] Update OpenTelemetry dependencies and fixing doc to make tracing work (#57908)
Tracing code hasn’t been maintained, and it can’t be run by relying on the docs alone. 1. [https://docs.ray.io/en/latest/ray-observability/user-guides/ray-tracing.html#installation](https://docs.ray.io/en/latest/ray-observability/user-guides/ray-tracing.html#installation) `opentelemetry-api==1.1.0` Version 1.1.0 is too old— https://github.com/ray-project/ray/blob/b988ce4e9b0fb618b40865600c0d98f1714c3bcf/ci/docker/serve.build.Dockerfile#L47 we’re already using 1.3.0+, which is incompatible with 1.1.0. 2. A legacy issue? This prevents the help information from being displayed. --------- Signed-off-by: justwph <2732352+wph95@users.noreply.github.com> Signed-off-by: JustWPH <2732352+wph95@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 3af4650 commit 8a4bfea

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

doc/source/ray-observability/user-guides/ray-tracing.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ First, install OpenTelemetry:
1515

1616
.. code-block:: shell
1717
18-
pip install opentelemetry-api==1.1.0
19-
pip install opentelemetry-sdk==1.1.0
20-
pip install opentelemetry-exporter-otlp==1.1.0
18+
pip install opentelemetry-api==1.34.1
19+
pip install opentelemetry-sdk==1.34.1
20+
pip install opentelemetry-exporter-otlp==1.34.1
2121
2222
Tracing startup hook
2323
--------------------

python/ray/util/tracing/tracing_helper.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ def _try_import(self, module):
7676
try:
7777
return importlib.import_module(module)
7878
except ImportError:
79-
if os.getenv("RAY_TRACING_ENABLED", "False").lower() in ["true", "1"]:
79+
if _is_tracing_enabled():
8080
raise ImportError(
81-
"Install opentelemetry with "
82-
"'pip install opentelemetry-api==1.0.0rc1' "
83-
"and 'pip install opentelemetry-sdk==1.0.0rc1' to enable "
84-
"tracing. See more at docs.ray.io/tracing.html"
81+
"Install OpenTelemetry with "
82+
"'pip install opentelemetry-api==1.34.1 opentelemetry-sdk==1.34.1 opentelemetry-exporter-otlp==1.34.1' "
83+
"to enable tracing. See the Ray documentation for details: "
84+
"https://docs.ray.io/en/latest/ray-observability/user-guides/ray-tracing.html#installation"
8585
)
8686

8787

0 commit comments

Comments
 (0)