OpenTelemetry Node.js Fetch Instrumentation
JSON →This package, `@gasbuddy/opentelemetry-instrumentation-fetch-node`, provides automatic OpenTelemetry instrumentation specifically for Node.js 18+ native `fetch` API calls. Unlike generic HTTP instrumentation, it is designed to work with the `undici`-based native `fetch` implementation in newer Node.js versions. The current stable version is 1.2.3, released in July 2024, with a consistent release cadence addressing bug fixes and features. A key differentiator is its use of Node.js's diagnostics channel for tracing and a unique workaround involving a 'phony fetch' to an unparseable URL, ensuring the instrumentation is active even with Node's lazy-loading behavior of the `fetch` API. It allows for advanced customization of spans and headers through an `onRequest` event. This is crucial for applications leveraging native `fetch` in modern Node environments that need comprehensive observability.
Traffic · last 30 days ↑500% vs prev 7d
top countries 🇺🇸 United States · 🇳🇴 Norway · 🇨🇦 Canada · 🇫🇷 France · 🇩🇪 Germany