photon-otel v3.2.0
New Features
setupOtel()now supports metrics alongside traces and logs. Useotel.getMeter(name)from the returned handle to create counters and other OpenTelemetry instruments.- Metrics can export over OTLP/HTTP with
/v1/metrics,OTEL_EXPORTER_OTLP_METRICS_ENDPOINT,OTEL_EXPORTER_OTLP_METRICS_HEADERS,OTEL_METRIC_EXPORT_INTERVAL, andOTEL_METRIC_EXPORT_TIMEOUT. - Scoped mode now includes metrics too, so
register: falsekeeps the app’s global meter provider untouched while still letting this setup emit metrics.
Bug Fixes
- An empty
OTEL_EXPORTER_OTLP_ENDPOINTno longer blocks the code-suppliedendpoint; it now falls back correctly. - Fetch auto-instrumentation now ignores the metrics exporter endpoint too, so OTLP metric export requests do not get traced by accident.
Improvement
- OTLP endpoint and header handling is now shared across traces, logs, and metrics, with signal-specific headers supported for each signal.
- Added a metrics guide, updated API/environment docs, and expanded Collector integration tests to verify real metric delivery. 📈
Version: 3.2.0