{"library":"opentelemetry-esbuild-plugin-node","title":"OpenTelemetry Esbuild Plugin for Node.js","description":"An esbuild plugin that bundles OpenTelemetry Node.js core and contrib instrumentations into your application at build time. Version 4.4.0 is the latest stable release, with active development. It simplifies adding OpenTelemetry tracing to Node.js apps by patching non-builtin packages and supporting configuration of instrumentations via the standard `@opentelemetry/auto-instrumentations-node` API. Differentiators: works specifically with esbuild, serializes instrumentation configuration at build time (leading to limitations on functions in configs), and does not bundle Node.js builtins (which are handled at runtime by the NodeSDK). Peer dependency on esbuild >=0.19.x.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install opentelemetry-esbuild-plugin-node"],"cli":null},"imports":["import { openTelemetryPlugin } from 'opentelemetry-esbuild-plugin-node'","import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { build } from 'esbuild';\nimport { openTelemetryPlugin } from 'opentelemetry-esbuild-plugin-node';\nimport { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';\n\nbuild({\n  entryPoints: ['src/server.ts'],\n  bundle: true,\n  outfile: 'dist/app.js',\n  platform: 'node',\n  target: 'node20',\n  plugins: [\n    openTelemetryPlugin({\n      instrumentations: getNodeAutoInstrumentations(),\n    }),\n  ],\n}).catch(() => process.exit(1));","lang":"typescript","description":"Shows minimal configuration to bundle OpenTelemetry Node.js instrumentations into an esbuild output.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}