Node.js
Trace Node.js services with the LogDrop Node.js agent.
LogDrop traces Node.js services without code changes. On Kubernetes, one pod annotation adds the LogDrop Node.js agent; outside Kubernetes, you add it to NODE_OPTIONS.
The agent is a distribution of OpenTelemetry JS. It records the requests your service handles and its calls to databases, caches, message brokers and other services, removes everything that could carry personal or secret data, and sends the spans to LogDrop over HTTPS with a traces ingest key. It removes the same data as the Java agent, so a request that crosses Java and Node.js services appears as one trace.
Current release: LogDrop Node.js agent 0.1.0-alpha1 (the image registry.logdrop.io/logdrop-node-agent and the npm packages @log-drop/node-agent and @log-drop/api) and Helm chart logdrop-infrastructure 0.1.1-alpha15.
Requirements
Before you install the agent, check that you have the LogDrop project and key, and that your platform, Node.js version and libraries are supported.
- The project, the traces ingest key and the endpoint from Before you start.
- Kubernetes 1.28 or newer with Helm 3.8 or newer, or any host that runs Node.js. On Kubernetes, the agent image
0.1.0-alpha1runs on linux/amd64 nodes only. - Node.js 22.15 or newer. Node.js 22, 24 and 26 are tested, on glibc and Alpine images. On an older Node.js the agent prints one line and your service runs untraced.
- CommonJS and ECMAScript module applications, JavaScript or compiled TypeScript. Traced libraries:
http,httpsandfetch, Express, Fastify, Koa, GraphQL, gRPC, PostgreSQL (pg), MySQL (mysql,mysql2), SQL Server (tedious), MongoDB, Redis (ioredis,redis), RabbitMQ (amqplib) and Kafka (kafkajs). - Next.js is not supported. If your build bundles the server into one file (esbuild, webpack, ncc), read Bundled applications first.
Install the agent
Choose the guide for where your service runs. Both add the same agent, configured with the same LOGDROP_* settings.
Kubernetes
Install the LogDrop Helm chart and opt workloads in with one pod annotation.
Outside Kubernetes
Install the agent from npm and start Node.js with it, on a host, with pm2 or systemd, or in a container.
Reference
These pages hold the details behind the install guides. Use them to keep a bundled service traced, add your own spans, change a setting, plan for limits or fix a problem.
Bundled applications
What a bundler hides from the agent, and how to keep your libraries traced.
Custom spans
Add spans for business operations with the optional @log-drop/api package.
Agent settings
Every LOGDROP_* setting, its default and its range.
Limits
What LogDrop accepts per request, per key and per project.
Rotate the ingest key
Replace a key without losing traces.
What LogDrop records
The data a span carries, and what never leaves your service.
Verify what you install
Check the signatures of the agent image and the chart.
Licences
The licences of the agent and the API package.
Troubleshooting
Agent messages and what to do about them.
.png)