@ripplo/instrument
v0.8.2
Published
Server-side OpenTelemetry preload for Ripplo — streams backend spans into test runs
Readme
@ripplo/instrument
Server-side OpenTelemetry preload for Ripplo. Load it in your app server during development and every test run's behavior.jsonl includes your backend spans — HTTP handlers, outbound fetches, queue work — correlated to the browser actions that triggered them.
Usage
Preload it when starting your dev server:
node --import @ripplo/instrument server.js
tsx watch --import @ripplo/instrument src/index.ts
NODE_OPTIONS="--import @ripplo/instrument" next devFrameworks with a register hook (Next.js instrumentation.ts) can call it directly:
import { register } from "@ripplo/instrument/register";
register();How it works
The preload starts a NodeSDK with auto-instrumentation and exports spans over OTLP to the Ripplo daemon's local receiver. The receiver's port is discovered through .ripplo/.local/otlp-port, written by ripplo daemon for the lifetime of your dev session. When the daemon isn't running, spans are dropped and your server runs as if the preload weren't there — safe to leave in your dev script permanently.
Installed by npx ripplo init. See the ripplo CLI for setup.
License
© Ripplo LLC. All rights reserved. Use is subject to Ripplo's Terms of Service.
