Skip to content

v0.11.1

Choose a tag to compare

@tonyalaribe tonyalaribe released this 29 Apr 21:28
· 12 commits to main since this release

Hardening pass after PR review.

Critical fixes

  • getTracer wrap recursion guard — tracers are cached by provider, so a second getTracer(name, version) call would re-bind the already-wrapped startSpan and recurse infinitely. Now guarded with a __monoscopeWrapped flag.
  • createMeterProvider failure no longer escapes the constructor — wrapped in try/catch, nulls out meterProvider on failure, matching the SDK's never-throw-into-host-code contract.
  • Pageview span now rotates after 30 min (PAGEVIEW_MAX_MS). Without this, long-running SPAs without route changes left the parent span open and BatchSpanProcessor never shipped it.

Important fixes

  • Skip MeterProvider entirely when captureWebVitals: false (was wasting a 30s timer + empty exports).
  • WebVitalName literal type ("LCP" | "INP" | "CLS" | "FCP" | "TTFB") prevents phantom histograms from typo'd callers.
  • shutdown() uses Promise.allSettled so a metric pipeline failure doesn't abort trace shutdown.
  • metricsExporterEndpoint debug-warns when exporterEndpoint is custom but doesn't match /v1/traces — silent metric POSTs to a trace endpoint were a confusing failure mode.

Polish

  • Trimmed verbose comments flagged by review.
  • New tests: closestInteractive, recordWebVital histogram caching/naming/units, constructor failure path, captureWebVitals flag gate.