Skip to main content

Documentation Index

Fetch the complete documentation index at: https://beta.docs.sqd.dev/llms.txt

Use this file to discover all available pages before exploring further.

Start a metrics server on the pipe process. Required by Pipes UI and by anything that scrapes Prometheus (Grafana, Alertmanager, etc.).
import { metricsServer } from "@subsquid/pipes/metrics/node";
import { solanaPortalStream } from "@subsquid/pipes/solana";

solanaPortalStream({
  // ...
  metrics: metricsServer({ port: 9090 }),
  // ...
});
Parameters:
  • port: HTTP port for the server (default: 9090).

Endpoints

metricsServer() serves four HTTP endpoints on the configured port. They are all also useful for ad-hoc inspection with curl.
PathContent
/statsJSON — per-pipe progress, speed, portal query, SDK version. This is what Pipes UI polls.
/metricsPrometheus text — built-in sqd_* series plus any custom metrics you registered. Scrape this from Prometheus.
/profilerJSON — recent per-batch span trees. See Profiling. Empty when profiling is disabled.
/healthResponds with ok.

Custom metrics

Register counters, gauges, histograms, and summaries via ctx.metrics in whole-pipe transformers, targets, or when consuming the pipe as an async iterator. See the Metrics guide.

See also

  • Pipes UI — visual dashboard that consumes /stats and /profiler.
  • Metrics — walkthrough for exposing Prometheus metrics and adding custom series.
  • Profiling — interpreting the /profiler span tree.