Documentation
Quick Start Guide
Get Obsyn tracing your RAG pipeline in under 5 minutes.
1
Create a pipeline
Register the pipeline you want to monitor. Each pipeline gets its own dashboard view.
bash
# From your Obsyn dashboard → Pipelines → New Pipeline
# Or via API:
curl -X POST https://obsync.pages.dev/api/pipelines \
-H "Content-Type: application/json" \
-H "Cookie: your-session-cookie" \
-d '{"name": "support-rag", "vector_store": "pinecone"}'2
Generate an API key
Go to Settings → API Keys → Generate New Key. Copy the key immediately — it is shown only once.
text
Your key looks like: obsn_live_a1b2c3d4e5f6...3
Install & wrap your RAG function
The obsyn SDK wraps any async function and traces every call automatically — latency, status, errors.
javascript
const { init, observe } = require("obsyn");
init({ apiKey: process.env.OBSYN_API_KEY });
// Wrap any async function — that's it.
const answer = observe("support-rag")(async function (question) {
const chunks = await retriever.invoke(question);
const context = chunks.map(c => c.content).join("\n");
return llm.complete(`Context: ${context}\nQuery: ${question}`);
});
// Every call now sends latency, status, and errors to your dashboard.4
Add quality scoring (optional)
Pass extract functions to capture quality scores, token counts, and hallucination flags alongside each trace.
typescript
import { init, observe } from "obsyn";
init({ apiKey: process.env.OBSYN_API_KEY });
const answer = observe("support-rag", {
// Extract metadata from the LLM response
qualityScore: (result) => result.evaluation?.faithfulness * 100,
tokens: (result) => result.usage?.total_tokens,
cost_usd: (result) => result.usage?.cost,
})(async function (question: string) {
const docs = await vectorStore.similaritySearch(question, 5);
const context = docs.map(d => d.pageContent).join("\n---\n");
const response = await llm.invoke([
{ role: "system", content: "Answer using only the provided context." },
{ role: "user", content: `Context: ${context}\n\nQuestion: ${question}` },
]);
return response;
});5
View your dashboard
Traces appear on your dashboard within seconds of ingestion. No polling needed — refresh to see latest.
What you'll see
- • Query volume and latency per pipeline
- • Quality scores trended over time
- • Error rates and failure clustering
- • Active alerts when thresholds are breached
Need Help?
Email engineers@obsync.pages.dev or use the contact form. We typically respond within 24 hours.