Search the docs

↑↓ to move · Enter to open · Esc to close

Type to search every page. Results are grouped by section.

TalariaDocs
Dashboard

Docs › SDKs

View as Markdown
On this page

Node.js

Install @newtalaria/node 0.6.1 for process errors and HTTP spans.

@newtalaria/node 0.6.1 captures process errors, incoming HTTP SERVER spans, outgoing http/https CLIENT spans with W3C traceparent, and optional pg / mysql2 / ioredis / @duckdb/node-api wrappers. Prisma, Drizzle, and Kysely record SQL when you wrap the pool they use.

Building Next.js? Install @newtalaria/nextjs instead.

Install#

npm install @newtalaria/node

Initialise#

import http from 'node:http';
import { Talaria, handleHttpRequest } from '@newtalaria/node';
 
Talaria.init({
  apiKey: process.env.TALARIA_API_KEY!, // tal_sk_…
  remoteConfig: true,
});
 
http.createServer((req, res) => {
  handleHttpRequest(req, res);
  res.end('ok');
}).listen(3000);

The API key decides the environment. Long-lived workers should call Talaria.resetRequestState() between jobs.

Verify#

Talaria.captureException(new Error('Talaria test error'));

Run this once, then open Issues in the dashboard. The test error shows as a new issue in the key's environment. Nothing there? See troubleshooting.

Next#

See configuration, errors, and tracing.

Was this helpful?