photon-otel v3.0.0
Breaking Changes
OTEL_INSTRUMENT_FETCHhas been removed. UsesetupOtel({ instrumentFetch: false })to turn fetch tracing off, orsetupOtel({ register: false })when embedding telemetry inside another library.
New Features
-
Added scoped mode with
setupOtel({ register: false }), so libraries can emit their own spans and logs without taking over the host app’s global OpenTelemetry setup. -
setupOtel()now returnstracerProviderandloggerProvideron the handle, making it easier to build extra tracers or attach processors when needed.
Improvement
-
withSpan,createLogger, and instrumented fetch now route through the active providers created bysetupOtel(), which makes scoped mode work consistently across traces, logs, and fetch spans. -
Automatic fetch instrumentation now defaults off in scoped mode, since wrapping global
fetchaffects the whole process. UsecreateInstrumentedFetch()for per-client tracing instead. ✨
Version: 3.0.0