Getting started
Quickstart
Get Rytena monitoring your Node.js app in three minutes. This guide walks through creating a project, installing the agent, and seeing your first data appear in the dashboard.
1. Create a project
Sign in to Rytena and create a new project. Each project has its own API key and monitors one or more processes.
Head to dashboard/projects/new, give your project a name, and click Create project.
2. Install the agent
Add rytena-agent to your Node.js project.
npm install rytena-agent
3. Initialize the agent
Add the following three lines at the top of your entry file — before any other imports.
const { Rytena } = require('rytena-agent')
Rytena.init({
apiKey: process.env.RYTENA_API_KEY
})
// The rest of your application
const express = require('express')
const app = express()
// ...Configuration options
The init() function accepts these options:
Rytena.init({
apiKey: 'ryt_xxxx.yyyy', // required
name: 'production-api', // optional — display name
endpoint: 'https://api.rytena.dev',// optional — self-hosted backend
interval: 30, // optional — seconds between snapshots
debug: false // optional — verbose logs
})4. Set your environment variable
Add your API key to your environment. In development, use a .env file:
RYTENA_API_KEY=ryt_xxxx.yyyy
In production, use your platform's secret manager. Never commit your API key to source control.
5. Start your app
node server.js
You should see the Rytena banner in your logs:
┌─────────────────────────────────────┐ │ Rytena Agent v0.1.0 │ ├─────────────────────────────────────┤ │ App production-api │ │ Endpoint https://api.rytena.dev │ │ Interval 30s │ └─────────────────────────────────────┘ rytena Connecting to Rytena... rytena Connected · process id 42
6. Watch your data appear
Open your dashboard and navigate to Processes. Within 30 seconds, your app will appear with live memory metrics.