From 668cfb7e27e488454dbf09a4927b8a60d6d49b40 Mon Sep 17 00:00:00 2001
From: Gahow Wang <gahow.wang@gmail.com>
Date: Sat, 11 Jul 2026 17:32:27 +0800
Subject: [PATCH 3/5] Log the OpProf output path at startup

Assisted-by: OpenAI Codex
---
 tests/v1/core/test_opprof.py    | 1 +
 vllm/v1/core/sched/scheduler.py | 2 ++
 vllm/v1/opprof.py               | 1 +
 3 files changed, 4 insertions(+)

diff --git a/tests/v1/core/test_opprof.py b/tests/v1/core/test_opprof.py
index 9bfbfcc..79c1fae 100644
--- a/tests/v1/core/test_opprof.py
+++ b/tests/v1/core/test_opprof.py
@@ -336,6 +336,7 @@ def test_writer_enospc_is_exposed_and_shutdown_is_bounded(
 def test_shutdown_flush_is_idempotent(tmp_path):
     sched = scheduler({"decode": request(8, 9)})
     rec, path = recorder(tmp_path)
+    assert rec.writer.path == path
     assert emit(rec, sched, schedule_output({"decode": 1}))
     rec.close()
     rec.close()
diff --git a/vllm/v1/core/sched/scheduler.py b/vllm/v1/core/sched/scheduler.py
index 303c562..769a02a 100644
--- a/vllm/v1/core/sched/scheduler.py
+++ b/vllm/v1/core/sched/scheduler.py
@@ -278,6 +278,8 @@ class Scheduler(SchedulerInterface):
             dp_rank=self.parallel_config.data_parallel_index,
             log_stats=self.log_stats,
         )
+        if self.opprof is not None:
+            logger.info("OpProf telemetry enabled: %s", self.opprof.writer.path)
 
         self.use_pp = self.parallel_config.pipeline_parallel_size > 1
         self.use_v2_model_runner = vllm_config.use_v2_model_runner
diff --git a/vllm/v1/opprof.py b/vllm/v1/opprof.py
index f0330d0..75f63de 100644
--- a/vllm/v1/opprof.py
+++ b/vllm/v1/opprof.py
@@ -68,6 +68,7 @@ class JSONLWriter:
         start: bool = True,
     ) -> None:
         self._queue: queue.Queue[Any] = queue.Queue(capacity)
+        self.path = path
         self._encoder = msgspec.json.Encoder()
         self._file = path.open("xb", buffering=1 << 20)
         self._thread = threading.Thread(target=self._run, daemon=True)
-- 
2.43.0

