SDKs
How your app sends data to Sypnia. One SDK for the browser, one for Node, one for Next.js, a bridge for apps that already use OpenTelemetry, and the OTLP intake for every other backend.
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 (decided 2026-11-17: see Licensing), and are the same for the open-source engine and for Sypnia Cloud. Two things differ, and every page shows both:
| Sypnia Cloud | Self-hosted engine | |
|---|---|---|
| Where the SDK sends | https://ingest.sypnia.com, the default (also answers at https://telemetry.ingest.sypnia.com). You set nothing. | Your engine’s base URL, in the option endpoint. |
| Where the key comes from | Your project’s page in telemetry.app.sypnia.com. | sypnia project create, or the API. |
npm
npm install @sypnia/telemetryimport { init } from '@sypnia/telemetry/browser';
init({ project: 'YOUR_PROJECT_KEY' });pnpm
pnpm add @sypnia/telemetryimport { init } from '@sypnia/telemetry/browser';
init({ project: 'YOUR_PROJECT_KEY' });yarn
yarn add @sypnia/telemetryimport { init } from '@sypnia/telemetry/browser';
init({ project: 'YOUR_PROJECT_KEY' });bun
bun add @sypnia/telemetryimport { init } from '@sypnia/telemetry/browser';
init({ project: 'YOUR_PROJECT_KEY' });script tag
<script async
src="https://telemetry.ingest.sypnia.com/v1/sdk.js"
data-project="YOUR_PROJECT_KEY"></script>No build step and no init call: paste it before </head>. The tag starts Sypnia with the key in data-project.
Which one you need
| Your app | Use |
|---|---|
| Anything that runs in a browser: React, Vue, Svelte, plain HTML, an app made with an AI builder | @sypnia/telemetry/browser |
| A Next.js app | @sypnia/telemetry/next, which covers the browser and the server |
| A Node server: Express, Fastify, Koa, NestJS, Hono | @sypnia/telemetry/node |
| A backend in Python, Go, PHP, Rust, Java or anything else | OpenTelemetry: point your OTLP exporter at Sypnia |
| A mobile app built as a web view | @sypnia/telemetry/browser |
| A native iOS or Android app | There is no native Sypnia SDK: send traces with OpenTelemetry’s SDK for your language, and use the browser SDK in web views. See Limits. |
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.
| Node or Next.js backend | Use |
|---|---|
| No OpenTelemetry today | @sypnia/telemetry/node or @sypnia/telemetry/next |
| OpenTelemetry already registered, or you need its instrumentations (Prisma, MySQL, MongoDB, Redis) | @sypnia/telemetry/otel, the bridge, at OpenTelemetry’s cost |
Own SDKs, a standard wire
Sypnia’s SDKs are its own, and light on purpose: none of them depends on OpenTelemetry. On the wire they split by what OpenTelemetry has a standard for:
| Sends | To | |
|---|---|---|
| Browser SDK | Sypnia’s compact events: sessions, replay, clicks, rage and dead clicks, vitals with their element. OpenTelemetry has no standard for these. It also sends the W3C traceparent header on calls to your API | /v1/ingest/events |
| Server SDKs (Node, Next.js) and the bridge | Traces in the OpenTelemetry protocol, OTLP/HTTP in protobuf, with OpenTelemetry’s attribute names and a few sypnia.* ones: the semantic conventions | /v1/otlp/v1/traces |
| Any OpenTelemetry exporter, any language | The same OTLP traces | /v1/otlp/v1/traces |
Why not OpenTelemetry inside the SDKs: we measured it. On one Node server, the official OpenTelemetry SDK added three to five times as much CPU per request as a light tracer of our own, and 600–800 ms to startup (measured on 2026-11-15: the numbers and the method). Why OTLP on the wire: so a server’s traces are readable by any tool, and so any language can send them.
The whole public API
The three main packages, a handful of functions. The bridge’s two functions are on its page.
| Function | @sypnia/telemetry/browser | @sypnia/telemetry/node | What it does |
|---|---|---|---|
init(options) | yes | yes | Starts the SDK. Once. |
identify(who) | yes | yes | Says who the person is, and their account. |
reportError(error) | yes | yes | Reports an error your code caught. |
track(name, props) | yes | no | Sends a custom event. |
flush() | yes | yes | Sends what is waiting. |
getSessionId() | yes | no | The current session’s id. |
optOut(), optIn() | yes | no | Stops and resumes everything for one browser. |
span(name, fn) | no | yes | Records a step of your own inside a request. |
setSpanAttributes(values), activeSpan() | no | yes | Sets attributes on the span the current code runs in, such as sypnia.case. |
shutdown() | no | yes | Sends what is waiting and stops. |
wrapFetchHandler(handler) | no | yes | Traces a function from a Request to a Response. |
injectTraceContext(payload), sqsTraceAttributes(attributes) | no | yes | Sends the current trace with work handed to a Lambda function or an SQS queue. See Queues and functions. |
wrapSqsHandler(handle), wrapLambdaHandler(handler), traceSqsRecord(message, fn) | no | yes | Continues that trace in the function that does the work, one span per message or invocation. |
continueTrace(carrier, name, fn) | no | yes | The same for a worker that is not a Lambda function. |
notifyNavigation(url, kind) | yes | no | For framework integrations: announces a navigation before the address changes. Apps do not call it. |
traceRequest(request, handle, options) | no | yes | For framework integrations: one traced request on a host with no Node server. Apps do not call it. |
@sypnia/telemetry/next gives you the browser functions from @sypnia/telemetry/next/client, the server functions from @sypnia/telemetry/next/server, withSypnia for next.config.ts, and traceOpenNext from @sypnia/telemetry/next/opennext for Next.js on AWS Lambda.
Every SDK is one npm package, @sypnia/telemetry (version 0.4.0), with a subpath per runtime: install it once and import @sypnia/telemetry/browser, /node or /next. It replaced @sypnia/browser, @sypnia/node and @sypnia/next on 2026-11-17; those stay on npm but are not released again. What changes between versions is in the changelog.
Pages in this section
- Install, every option, what is captured without code.
- Requests, outgoing calls and errors of a Node server.
- One trace through SQS queues and AWS Lambda functions.
- Public pages observed without identity or anything that lasts.
- One setup for the client and the server, and source maps at build.
- Any other backend, through OTLP/HTTP.
- A Node or Next.js app that already uses OpenTelemetry.
- The defaults, and how to mask more.
- Persons, accounts and anonymous sessions.
- Which sessions are recorded, and what happens at a limit.
- Nothing arrives, ad blockers, source maps, duplicate sessions.
The exact shape of everything the SDKs send is the event schema for the browser and the semantic conventions for the server.