Skip to content

Add metrics observer sidecar, NIXL handshake recorder, and signal-based profiling - #2

Draft
thameem-abbas wants to merge 1 commit into
openshift-psap:mainfrom
thameem-abbas:feat/observer-sidecar-nixl-handshake
Draft

Add metrics observer sidecar, NIXL handshake recorder, and signal-based profiling#2
thameem-abbas wants to merge 1 commit into
openshift-psap:mainfrom
thameem-abbas:feat/observer-sidecar-nixl-handshake

Conversation

@thameem-abbas

Copy link
Copy Markdown
Member

Summary

  • metrics_observer.py: Prometheus metrics observer sidecar that polls vLLM /metrics, detects throughput plateau (coefficient of variation < threshold over sliding window), then writes /tmp/profiler_start signal file. Stdlib only, no external deps.
  • sitecustomize.py: Add NixlHandshakeRecorder with import hook to time _nixl_handshake() calls and export to JSON. Add signal-mode profiling that waits for signal file instead of fixed call ranges.
  • webhook.py: Add observer sidecar injection via vllm.profiler/observer annotation, new annotation mappings for nixl-handshake/signal-mode/observer config, auto-detect vLLM port from pod spec.
  • kustomization.yaml: Add metrics_observer.py to ConfigMap generator.

Test plan

  • Deploy with vllm.profiler/observer: "true" annotation, verify metrics-observer sidecar is injected
  • Run load test, verify observer detects throughput plateau and writes signal file
  • Verify profiler starts after signal file appears and exports trace
  • Verify NIXL handshake timings are recorded to /tmp/nixl_handshake_timings.json
  • Build webhook container image via CI pipeline

🤖 Generated with Claude Code

…ed profiling

- metrics_observer.py: Prometheus metrics observer that detects throughput
  plateau via coefficient of variation, then writes signal file to trigger
  profiling at steady state. Runs as sidecar container, stdlib only.

- sitecustomize.py: Add NixlHandshakeRecorder to time _nixl_handshake()
  calls via import hook. Add signal_mode that waits for signal file instead
  of fixed call ranges before starting torch.profiler.

- webhook.py: Add observer sidecar injection (build_observer_sidecar_patch),
  new annotation mappings for nixl-handshake, signal-mode, observer config.
  Auto-detects vLLM port from pod spec.

- kustomization.yaml: Add metrics_observer.py to ConfigMap generator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: thameem-abbas <thibrahi@redhat.com>
@thameem-abbas
thameem-abbas marked this pull request as draft May 1, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant