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.

Your API key is shown only once at project creation. Save it somewhere safe — you cannot see it again.

2. Install the agent

Add rytena-agent to your Node.js project.

bash
npm install rytena-agent

3. Initialize the agent

Add the following three lines at the top of your entry file — before any other imports.

server.js
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:

javascript
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:

.env
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

bash
node server.js

You should see the Rytena banner in your logs:

bash
┌─────────────────────────────────────┐
│         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.

You're all set. Rytena is now monitoring your app. If a memory leak develops, you'll see it in the dashboard and receive an email alert.

What's next