Skip to content

photon-otel v3.0.0

Choose a tag to compare

@photon-action-bot photon-action-bot released this 30 Jun 20:09
· 20 commits to main since this release

Breaking Changes

  • OTEL_INSTRUMENT_FETCH has been removed. Use setupOtel({ instrumentFetch: false }) to turn fetch tracing off, or setupOtel({ 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 returns tracerProvider and loggerProvider on 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 by setupOtel(), which makes scoped mode work consistently across traces, logs, and fetch spans.

  • Automatic fetch instrumentation now defaults off in scoped mode, since wrapping global fetch affects the whole process. Use createInstrumentedFetch() for per-client tracing instead. ✨


Version: 3.0.0