You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ext/otel): remove panicking unwraps in telemetry code (#32557)
## Summary
- Replace `.unwrap()` calls on `OTEL_GLOBALS.get()` and isolate slot
accesses
with graceful error handling throughout `ext/telemetry/lib.rs`
- GC prologue/epilogue callbacks now return early if the isolate slot is
missing
(can happen during isolate teardown in watch mode restarts)
- `op_otel_enable_isolate_metrics` / `op_otel_collect_isolate_metrics`
return
early if globals or slots are not available
- `OtelTracer::builtin()`, `OtelTracer::start_span()`,
`OtelTracer::start_span_foreign()`, and `OtelMeter::new()` return JS
errors
instead of panicking
## Context
These unwraps could panic in watch mode when:
1. V8 GC callbacks fire during isolate teardown after slots have been
cleaned up
2. OTEL globals are accessed before initialization completes
Refs: #29478
Refs: #30567
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
0 commit comments