{"name":"opentelemetry-instrumentation-fetch-node","version":"1.2.0","keywords":["typescript","gasbuddy","opentelemetry","fetch","undici"],"author":{"name":"GasBuddy Developers","email":"developers@gasbuddy.com"},"license":"MIT","_id":"opentelemetry-instrumentation-fetch-node@1.2.0","homepage":"https://github.com/gas-buddy/opentelemetry-instrumentation-fetch-node#readme","bugs":{"url":"https://github.com/gas-buddy/opentelemetry-instrumentation-fetch-node/issues"},"dist":{"shasum":"5beaad33b622f7021c61733af864fb505cd35626","tarball":"http://registry-npm.ywwl.com/opentelemetry-instrumentation-fetch-node/download/opentelemetry-instrumentation-fetch-node-1.2.0.tgz","fileCount":23,"integrity":"sha512-aiSt/4ubOTyb1N5C2ZbGrBvaJOXIZhZvpRPYuUVxQJe27wJZqf/o65iPrqgLcgfeOLaQ8cS2Q+762jrYvniTrA==","signatures":[{"sig":"MEQCID9j8IRebfc0amZpX7Yc0QMDfdu5FyWfnvKkPhG6quyhAiA0kEROIZnM+fc5kI+cRZCZIgjEq2O8IdBAE3M7Ic6xrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79640,"size":24648,"noattachment":false,"key":"/opentelemetry-instrumentation-fetch-node/-/opentelemetry-instrumentation-fetch-node-1.2.0.tgz"},"main":"build/index.js","types":"build/index.d.ts","config":{"coconfig":"@openapi-typescript-infra/coconfig"},"engines":{"node":">18.0.0"},"gitHead":"0f718137486d24c1c60b8a1a90c36ae012110dd0","release":{"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator",["@semantic-release/exec",{"publishCmd":"yarn dlx pinst --disable"}],"@semantic-release/npm","@semantic-release/github"],"branches":["main"]},"scripts":{"lint":"eslint src","test":"vitest","build":"tsc -p tsconfig.build.json","clean":"yarn dlx rimraf ./build","_postinstall":"yarn coconfig"},"_npmUser":{"name":"djmax","email":"max@pyralis.com"},"repository":{"url":"git+https://github.com/gas-buddy/opentelemetry-instrumentation-fetch-node.git","type":"git"},"_npmVersion":"10.2.3","description":"OpenTelemetry Node 18+ native fetch automatic instrumentation package","directories":{},"_nodeVersion":"20.12.0","dependencies":{"@opentelemetry/api":"^1.6.0","@opentelemetry/instrumentation":"^0.43.0","@opentelemetry/semantic-conventions":"^1.17.0"},"_hasShrinkwrap":false,"packageManager":"yarn@3.2.4","devDependencies":{"eslint":"^8.53.0","vitest":"^0.34.6","coconfig":"^1.0.0","typescript":"^5.2.2","semantic-release":"^22.0.7","eslint-plugin-import":"^2.29.0","@semantic-release/exec":"^6.0.3","eslint-config-prettier":"^9.0.0","@semantic-release/github":"^9.2.2","@typescript-eslint/parser":"^6.10.0","@opentelemetry/sdk-trace-base":"^1.17.0","@opentelemetry/sdk-trace-node":"^1.17.0","@commitlint/config-conventional":"^18.1.0","@typescript-eslint/eslint-plugin":"^6.10.0","@semantic-release/commit-analyzer":"^11.1.0","@openapi-typescript-infra/coconfig":"^4.2.2","@semantic-release/release-notes-generator":"^12.1.0"},"_npmOperationalInternal":{"tmp":"tmp/opentelemetry-instrumentation-fetch-node_1.2.0_1712504054856_0.2574834827735335","host":"s3://npm-registry-packages"},"readme":"# opentelemetry-instrumentation-fetch-node\n\n[![TypeScript](https://badges.frapsoft.com/typescript/code/typescript.png?v=101)](https://github.com/ellerbrock/typescript-badges/)\n\n![main CI](https://github.com/gas-buddy/opentelemetry-instrumentation-fetch-node/actions/workflows/nodejs.yml/badge.svg)\n\n[![npm version](https://badge.fury.io/js/@gasbuddy%2Fopentelemetry-instrumentation-fetch-node.svg)](https://badge.fury.io/js/opentelemetry-instrumentation-fetch-node)\n\nOpenTelemetry Node 18+ native fetch automatic instrumentation package.\n\nExisting instrumentation packages (like [@opentelemetry/instrumentation-http](https://www.npmjs.com/package/@opentelemetry/instrumentation-http)) do not work with Node 18+ native fetch, which is based on the [undici module](https://undici.nodejs.org/#/) but packaged in a \"strange\" way (some sort of internal bundle that I don't really understand). This module uses the new Node diagnostics channel to instrument native fetch.\n\nNote that due to the fact that fetch is lazy loaded in Node, this module will kick off a \"phony\" fetch\nto an unparseable URL (blank string) to get the library to load so we don't miss any events (because the\ndiagnostics channel would not yet exist).\n\nSee the tests for an example setup - note the onRequest event that allows you to add outbound headers or\nspan attributes or what have you.\n","publish_time":1712504055137,"maintainers":[{"name":"djmax","email":"max@pyralis.com"}],"_cnpm_publish_time":1712504055137,"dist-tags":{"latest":"1.2.3"}}