Docs

SDKs

How your app sends data to Sypnia. One SDK for the browser, one for Node, one for Next.js, and the OpenTelemetry intake for every other backend.

Applies to EngineCloud At launch

View as Markdown
On this page
  1. Which one you need
  2. The whole public API
  3. Pages in this section

An SDK is the small piece of Sypnia that lives inside your app. It notices what happens (an error, a slow page, a click that does nothing) and sends it to Sypnia as events.

The SDKs are open source under the MIT licence and are the same for the open-source engine and for Sypnia Cloud. Two things differ, and every page shows both:

Sypnia CloudSelf-hosted engine
Where the SDK sendshttps://ingest.sypnia.com, the default. You set nothing.Your engine’s base URL, in the option endpoint.
Where the key comes fromYour project’s page in app.sypnia.com.sypnia project create, or the API.

npm

npm install @sypnia/browser
import { init } from '@sypnia/browser';

init({ project: 'YOUR_PROJECT_KEY' });

Full quickstart

Which one you need

Your appUseStatus
Anything that runs in a browser: React, Vue, Svelte, plain HTML, an app made with an AI builder@sypnia/browserAt launch
A Next.js app@sypnia/next, which covers the browser and the serverAt launch
A Node server: Express, Fastify, Koa, NestJS, Hono@sypnia/nodeAt launch
A backend in Python, Go, PHP, Rust, Java or anything elseOpenTelemetry: point your OTLP exporter at SypniaAt launch
A mobile app built as a web view@sypnia/browserAt launch
A native iOS or Android appNative SDKs are planned. See Planned.Planned

A web app with its own backend uses two: the browser SDK in the page and a server SDK (or OpenTelemetry) in the backend, both sending to the same project. That is what lets Sypnia follow one click from the page to the database.

The whole public API

Three packages, a handful of functions.

Function@sypnia/browser@sypnia/nodeWhat it does
init(options)yesyesStarts the SDK. Once.
identify(who)yesyesSays who the person is, and their account.
reportError(error)yesyesReports an error your code caught.
track(name, props)yesnoSends a custom event.
flush()yesyesSends what is waiting.
getSessionId()yesnoThe current session’s id.
optOut(), optIn()yesnoStops and resumes everything for one browser.
span(name, fn)noyesRecords a step of your own inside a request.
shutdown()noyesSends what is waiting and stops.
wrapFetchHandler(handler)noyesTraces a function from a Request to a Response.

@sypnia/next gives you the browser functions from @sypnia/next/client, the server functions from @sypnia/next/server, and withSypnia for next.config.ts.

Pages in this section

  • Browser

    Install, every option, what is captured without code.
  • Node

    Requests, outgoing calls and errors of a Node server.
  • Next.js

    One setup for the client and the server, and source maps at build.
  • OpenTelemetry

    Any other backend, through OTLP/HTTP.
  • Privacy and masking

    The defaults, and how to mask more.
  • Identifying people

    Persons, accounts and anonymous sessions.
  • Sampling and quotas

    Which sessions are recorded, and what happens at a limit.
  • Troubleshooting

    Nothing arrives, ad blockers, source maps, duplicate sessions.

The exact shape of everything the SDKs send is the event schema.

Sections

Start hereWhat Sypnia is, how it works, what is open source and what is the paid cloud, and the two ways to get your first problem in plain words.ConceptsThe ten ideas Sypnia is made of, each defined precisely, from a project and its keys to problems, traces and alerts.SDKsHow your app sends data to Sypnia. One SDK for the browser, one for Node, one for Next.js, and the OpenTelemetry intake for every other backend.The agentHow Sypnia analyses a problem, what it writes, what it sends to a model and what it never does.MCP and skillsConnect your coding agent to Sypnia so it can ask what is failing in production, read what it needs to fix it, and set Sypnia up for you.API referenceThe Sypnia HTTP API: one API for the open-source engine and for Sypnia Cloud, with every endpoint, parameter, response and error.CLI referenceThe sypnia command: how to install it, the variables it reads, what its exit codes mean, and where each command is documented.Self-hostingWhat you run when you host the Sypnia engine yourself, what you need, what it costs, and what you do not get compared with Sypnia Cloud.How the engine is builtThe whole Sypnia engine on one page, from a click in your app to the sentence your coding agent reads, with the design rules and the code that holds them.Sypnia CloudHow the paid service works, from organizations and roles to plans, limits, billing, where your data lives, the GitHub App and support.Privacy and securityWhat Sypnia collects from your app and its users, what it never collects, how masking works, how to delete data, and how the service is protected.LicensingWhich licence covers each part of Sypnia, what you may do with it, how the name may be used, and the terms of a contribution.GuidesStep-by-step recipes for the common ways to use Sypnia, from apps made with AI builders and Next.js on Vercel to Supabase, source maps in CI, alert e-mails from your own engine, and moving from Sentry.ReferenceThe pages you look things up in, from the event schema and the glossary to what is planned, the changelog and the common questions.
↑↓ to move↵ to openEsc to close