elina
Documentation

Start tracing with Elina.

Run the server on your own machine, create a project, and send your first Python trace.

1. Run the server

Install Docker with Compose, then clone the Elina repository and copy its environment template.

git clone https://github.com/iamrobins/elina.git
cd elina
cp .env.example .env

Edit .env: choose separate random hex values of at least 32 characters for POSTGRES_PASSWORD and ADMIN_TOKEN, and 64 random hex characters for SESSION_SECRET. Generate DASHBOARD_PASSWORD_HASH by replacing the sample password below, then paste the output into .env.

docker run --rm ghcr.io/iamrobins/elina:latest node -e "const c=require('node:crypto'); const s=c.randomBytes(16); console.log('scrypt:'+s.toString('hex')+':'+c.scryptSync('your-dashboard-password',s,64).toString('hex'))"

Start the API, dashboard, and database:

docker compose up -d --build

The dashboard is at http://127.0.0.1:3001; the local API is at http://127.0.0.1:3000. If startup takes a moment, run docker compose ps.

2. Create a project

Sign in to the dashboard with the password you chose. Create a project and copy its ingestion key when it appears. Elina shows the key only once.

Keep the ingestion key in server-side code or an environment variable. It allows an application to write traces to that project.

3. Send a Python trace

Install the Elina Python SDK (Python 3.11 or newer) and set ELINA_WRITE_KEY to your project's ingestion key.

python -m pip install elinaobs
export ELINA_WRITE_KEY=your-project-ingestion-key

In PowerShell, set the key with $env:ELINA_WRITE_KEY="your-project-ingestion-key" instead. Then run a script like this:

import os
from elinaobs import init, trace, flush

init(
    api_key=os.environ["ELINA_WRITE_KEY"],
    endpoint="http://127.0.0.1:3000/v1/traces",
    service_name="my-agent",
)

@trace(name="Answer", as_type="agent")
def answer(question: str) -> str:
    return f"You asked: {question}"

answer("Hello")
flush()

Open the project's Traces page to see the result. The included demo shows child spans and prints the trace ID.

Deploy on your own domain

The production Compose file adds HTTPS and daily local database backups. Set ELINA_DOMAIN, ACME_EMAIL, and an absolute BACKUP_DIR in .env; point your domain at the host and open ports 80 and 443. Read the deployment and restore instructions before starting a production installation.

Use https://<your-domain>/v1/traces as the SDK endpoint. Copy database backups off the host and verify a fresh archive before upgrades.

More detail

Read the server repository for API routes, deployment, and backup details. The SDK repository covers feedback, configuration, limitations, and development checks.