After you install the ARMS Application Monitoring Node.js agent, it automatically instruments supported frameworks and components at startup, collecting request traces, call latency, errors, database access, messaging calls, log-trace correlation, runtime metrics, and AI call traces.
Prerequisites
-
(Recommended) Node.js 14.x or later. For AI-related components and ESM Loader scenarios, use Node.js 16 or later. For production environments, use Node.js 18 or Node.js 20 LTS.
-
The ARMS Node.js agent is installed.
npm install @loongsuite/cms_node_sdk -
The agent must load before your application frameworks and components. If modules such as
express,mysql2, oropenaiload before the agent starts, instrumentation may be incomplete. For CommonJS applications, use the-rflag to preload the agent. For ESM applications, use the Loader approach.node -r @loongsuite/cms_node_sdk/register app.js node --experimental-loader=@loongsuite/cms_node_sdk/import-hooks app.mjs
Version information
The supported version ranges for Application Monitoring in the following tables are based on the automatic instrumentation component definitions in @loongsuite/cms_node_sdk@1.0.10 and its dependency packages.
For Node.js built-in modules, runtime metrics, and diagnostics channel-based instrumentation, the agent does not filter by npm package version. Instead, instrumentation depends on the Node.js runtime version and whether the module exposes a collectible entry point.
If a framework is not listed below but uses Node.js built-in modules such as http, https, undici, or net, the agent can still collect basic entry or exit traces. Framework-specific capabilities such as routing, middleware, Agent, and Tool require dedicated instrumentation.
Web frameworks
|
Component or framework |
npm package |
Supported versions |
Collected data |
|
Express |
express |
>=4.0.0 <6.0.0 |
HTTP entry traces, routing information, middleware and handler execution, and error messages |
|
Koa |
koa |
>=2.0.0 <4.0.0 |
HTTP entry traces, middleware execution, routing information, and error messages |
|
Next.js |
next |
>=12.0.0 <17.0.0 |
Server-side requests, SSR, RSC, API routes, error pages, static pages, routing information, status codes, latency, and error messages |
|
Nuxt 2 |
@nuxt/server, @nuxt/vue-renderer, @nuxt/core |
>=2.3.0 <3.0.0 |
SSR, SPA, API, server middleware, |
|
Nuxt 3/Nitro/h3 |
h3, hookable, Node.js |
h3 >=1.0.0 <2.0.0; hookable >=5.0.0 <6.0.0 |
Server-side requests, h3 handlers, Nitro hooks, and Node.js request listeners |
|
Socket.IO |
socket.io |
2.x, >=3.0.0 <5.0.0 |
Event sending and receiving, namespaces, room broadcasting, message latency, and error messages |
HTTP, RPC, and network communication
|
Component or module |
npm package |
Supported versions |
Collected data |
|
Node.js HTTP |
http, https |
Node.js built-in module |
HTTP server entries, HTTP client exits, status codes, request latency, request and response sizes, and error messages |
|
Undici |
undici |
No fixed semver range |
HTTP client requests, status codes, latency, and error messages collected through the diagnostics channel |
|
gRPC |
@grpc/grpc-js |
>=1.0.0 <2.0.0 |
gRPC client and server calls, service and method, status codes, latency, and error messages |
|
DNS |
dns, dns/promises |
Node.js built-in module |
DNS lookup calls, resolution latency, and error messages. DNS instrumentation is disabled by default starting with version 1.0.9. Explicitly enable it with |
|
TCP/Unix Socket |
net |
Node.js built-in module |
TCP and Unix Socket connections, destination addresses, ports, and connection errors |
Databases and ORMs
|
Component or framework |
npm package |
Supported versions |
Collected data |
|
MySQL |
mysql |
>=2.0.0 <3.0.0 |
SQL call traces, SQL statements, connection information, slow queries, and error messages |
|
MySQL2 |
mysql2 |
>=1.4.2 <4.0.0 |
SQL call traces, query and execute operations, SQL statements, connection information, slow queries, and error messages |
|
PostgreSQL |
pg |
>=8.0.3 <9.0.0 |
SQL call traces, SQL statements, connection information, slow queries, and error messages |
|
PostgreSQL Pool |
pg-pool |
>=2.0.0 <4.0.0 |
Connection pool connect calls and supplementary database access trace information |
|
MongoDB |
mongodb |
>=3.3.0 <4.0.0, >=4.0.0 <7.0.0 |
MongoDB commands, collections, database names, connection information, latency, and error messages |
|
Mongoose |
mongoose |
>=5.9.7 <9.0.0 |
Model, Query, and Aggregate calls, collection information, database operations, latency, and error messages |
Caching and message queues
|
Component or framework |
npm package |
Supported versions |
Collected data |
|
Redis |
redis |
>=2.6.0 <4.0.0 |
Redis commands, connection information, call latency, and error messages |
|
Node Redis Client |
@redis/client, @node-redis/client |
>=1.0.0 <2.0.0, >=5.0.0 <6.0.0 |
Redis v4 and v5 client commands, multi commands, connection information, call latency, and error messages |
|
ioredis |
ioredis |
>=2.0.0 <6.0.0 |
Redis commands, connection information, call latency, and error messages |
|
KafkaJS |
kafkajs |
>=0.3.0 <3.0.0 |
Kafka producer and consumer calls, topics, message send and receive latency, and error messages |
Logging frameworks
|
Component or framework |
npm package |
Supported versions |
Collected data |
|
Pino |
pino |
>=7.0.0 <11.0.0 |
Trace correlation field injection into logs |
|
Winston |
winston |
>=3.0.0 <4.0.0 |
Trace correlation field injection into logs |
|
Bunyan |
bunyan |
>=1.8.0 <3.0.0 |
Trace correlation field injection into logs |
|
Console |
console |
Node.js global object |
Trace correlation field injection into console.log, console.info, console.warn, and console.error |
AI application components
|
Component or framework |
npm package |
Supported versions |
Collected data |
|
OpenAI Node SDK |
openai |
>=4.0.0 <6.0.0 |
Chat, Completion, and Image calls, model information, token usage, streaming calls, and error messages |
|
LangChain JS |
@langchain/core, langchain |
No fixed semver range. Subject to the availability of module entry points such as @langchain/core/callbacks/manager. |
Chain, LLM, Tool, Retriever, and Embedding run traces, token usage, and error messages |
|
LangGraph |
@langchain/langgraph |
No fixed semver range. Subject to the availability of module entry points such as @langchain/langgraph/prebuilt and @langchain/langgraph/pregel. |
ReAct Agent, Pregel stream, Agent and Step metadata, forming complete Agent traces in collaboration with LangChain instrumentation |
|
Vercel AI SDK |
ai |
>=4.0.0 <7.0.0 |
generateText, streamText, generateObject, streamObject, Tool, Embedding, Rerank, and Agent call traces |
|
Anthropic Claude Agent SDK |
@anthropic-ai/claude-agent-sdk |
>=0.3.0 <1.0.0 |
query and startup calls, Agent runs, model requests, tool calls, session information, token usage, and error messages |
|
Mastra |
@mastra/core, @mastra/observability |
@mastra/core >=1.50.0 && <2.0.0 |
Agent, Step, LLM, Tool, and Workflow spans, plus input and output, tokens, errors, and RED metrics. Install |
|
Genkit |
@genkit-ai/core |
>=1.0.4 && <2.0.0 |
Flow, Agent, Model, Tool, Retriever, and Embedding call traces, token usage, and error messages |
|
MCP SDK v1 |
@modelcontextprotocol/sdk |
>=1.0.0 && <2.0.0 |
MCP Server request, notification, and tool handler spans, including parameters, results, resource URIs, JSON-RPC errors, and latency |
|
MCP Server v2 |
@modelcontextprotocol/server |
>=2.0.0 && <3.0.0 |
Automatic collection of MCP v2 Server requests, notifications, and tool handler spans |
|
Chrome DevTools MCP |
chrome-devtools-mcp |
>=1.8.0 && <1.9.0 |
Chrome DevTools tool calling traces. |
|
Pi Agent SDK |
@earendil-works/pi-agent-core, @earendil-works/pi-ai, @earendil-works/pi-coding-agent, @earendil-works/pi-durable |
>=0.74.0 <2; pi-durable >=1.2.0 <1.3.0 |
Agent, Step, LLM, Tool, compaction, tree navigation, streaming responses, retries, and queue events. Collects model, provider, token, cached token, cost, time to first token, status, and duration. |
|
OpenClaw |
openclaw, @loongsuite/cms_instrumentations/openclaw |
Added in version 1.0.11. Validated with OpenClaw 2026.10.5; no complete supported-version range is defined. |
Collects model, tool, sub-agent, error, and cancellation traces. In RUM scenarios, content is not collected by default; this default does not apply to a standard NodeSDK. The validated environment includes standalone Node agents and gateways, plus main, worker, utility, spawn, and fork processes in Electron 44.9.1. ASAR validation covers runtime extraction and injection only; it does not constitute complete OpenClaw ASAR business validation. |
Node.js runtime metrics
|
Metric category |
Collection target |
Collected data |
|
Event Loop |
Node.js event loop |
Event loop delay, event loop utilization, and other metrics |
|
V8 |
V8 engine |
Heap memory, GC count, GC latency, heap space usage, and other metrics |
|
Process |
Node.js process |
CPU, memory, thread-related metrics, open file descriptors, context switches, virtual memory, and other process metrics |
Additional integration capabilities
|
Integration capability |
Description |
|
RUM Electron |
Added in version 1.0.11. Provides a Node.js Trace runtime that can accept callbacks or handoff through an authenticated local HTTP channel for use with RUM Electron. |
|
Open-source OpenTelemetry instrumentation |
Uses the OpenTelemetry API compatibility bridge to bring traces, metrics, and context from open-source instrumentation into NodeSDK. It automatically deduplicates overlapping NodeSDK native collection. Install and enable third-party instrumentation separately; actual support depends on validation. |
|
|
Uses the OpenTelemetry API compatibility bridge to bring GenAI spans created by |
Configuration
Most built-in instrumentations are enabled by default. DNS instrumentation is disabled by default starting with version 1.0.9. Explicitly enable it with dns: { enabled: true } when needed. You can adjust instrumentation per application in the ARMS console or through the instrumentations field when initializing the SDK.
The following example configures the instrumentations field:
const { NodeSDK } = require('@loongsuite/cms_node_sdk');
const sdk = new NodeSDK({
serviceName: 'your-app-name',
licenseKey: 'your-license-key',
regionId: 'cn-hangzhou',
instrumentations: {
next: {
enabled: true
},
nuxt: {
enabled: true
},
mysql2: {
enabled: true
},
openai: {
enabled: true
},
vercel_ai: {
enabled: true
},
mastra: { enabled: true },
genkit: { enabled: true },
mcp: { enabled: true },
},
});
sdk.start();
Common configuration keys:
|
Category |
Configuration keys |
|
HTTP and network |
|
|
Web frameworks |
|
|
Databases |
|
|
Caching and messaging |
|
|
Logging |
|
|
AI |
|
|
Runtime |
|
|
Top-level SDK |
|
The configuration key for Mongoose is moogoose, not mongoose. This is a known code-level key name. The Mongoose component is displayed as mongoose in user-facing contexts. If you explicitly configure the Mongoose instrumentation switch in code, use moogoose.
Usage notes
-
Automatic instrumentation requires the agent to load before target modules. If your application loads modules such as
express,next,nuxt,mysql2,openai,@mastra/core,@genkit-ai/core, or MCP Server modules before starting the agent, instrumentation for those components may be incomplete. -
Next.js automatic instrumentation is supported starting with
@loongsuite/cms_node_sdk@1.0.5. Nuxt 2 automatic instrumentation is supported starting with@loongsuite/cms_node_sdk@1.0.7. Mastra, Genkit, and MCP Server automatic instrumentation are supported starting with version 1.0.9. -
Nuxt 2 instrumentation uses the
@nuxt/server,@nuxt/vue-renderer, and@nuxt/coremodules. Nuxt versions earlier than 2.3.0 are not supported. -
AI components can involve content such as prompts, responses, and tool inputs and outputs. MCP collects tool parameters, parameter summaries, and results, using a fixed-length safe JSON projection to limit attribute size. Screenshots, audio, blobs, and other binary content are omitted. MCP does not currently provide separate redaction settings. Before enabling it in a production environment, confirm that this content is permitted in traces.
-
MCP instrumentation is enabled by default in version 1.0.9. The initial release provides only the
mcp: { enabled: boolean }switch and supports the server side only. MCP SDK v1 requires Node.js 18 or later, and MCP Server v2 requires Node.js 20 or later.chrome-devtools-mcp 1.8.xrequires Node.js 20.19+, 22.12+, or 23+. ESM applications continue to use the existingimport-hooksLoader and do not require an additional registration entry point. -
MCP
tools/calloperations are marked asgen_ai.span.kind=TOOL. Protocol operations such as resource and prompt remain ordinary MCP Server spans and are not inferred as Retriever or Reranker spans by name. Actual retrieval or reranking calls inside a tool must produce nested spans through the relevant framework or model SDK instrumentation. -
Starting with version 1.0.9, the agent sends its INFO, DEBUG, WARN, and ERROR diagnostic output to stderr according to the configured log level. Application
console.logoutput remains on stdout. Applications using a stdio MCP Server must ensure that business logs are not written to stdout. -
For unlisted components, the agent may still collect basic traces through underlying HTTP, RPC, or database client instrumentation, but framework-specific semantic fields and view capabilities are not guaranteed.
-
Component version ranges are updated with each agent release. After upgrading, check the documentation and release notes for updated version support.