Catch the release that made your API slower.
wshapnin times every endpoint and every block inside it, per version.
POST /api/checkout
212 → 486 ms +129 %
95 % of calls under, before vs after the release
- http486 ms+129 %
- db.query74 ms±0 %
- payment.charge402 ms+191 %
← the block your release made slower
Latency monitoring per endpointEvery release compared with the lastThe block that got slower, found for you
How it works.
Measure
Wrap a route or a block. About a microsecond per call, nothing to configure.
Release
A new version gets its own numbers. wshapnin marks the release on every chart.
Compare
Every minute it checks the last 15 minutes against the hours before and flags what got worse.
async with wshapnin.timer("http", labels={"endpoint": "GET /api/products"}, version="1.3"):
async with wshapnin.timer("db.query"):
rows = await load_products()
wshapnin.record("browser.roundtrip", 182.4, labels={"endpoint": "GET /api/products"})pip install wshapnin · Python 3.10+
import * as wshapnin from "wshapnin";
const http = wshapnin.timer("http", { labels: { endpoint: "GET /api/products" }, version: "1.3" });
const query = wshapnin.timer("db.query");
app.get("/api/products", async (req, res) => {
const rows = await http.run(() => query.run(() => loadProducts()));
res.json(rows);
});
// every route at once: app.use(wshapnin.express()), Fastify: app.register(wshapnin.fastify())npm install wshapnin · Node.js 22+ · browser timings (record) are Python-only for now
func products(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
defer wshapnin.Measure(&ctx, "http",
wshapnin.WithLabels(wshapnin.Labels{"endpoint": "GET /api/products"}),
wshapnin.WithVersion("1.3"))(nil)
ctx, end := wshapnin.Start(ctx, "db.query")
rows, err := loadProducts(ctx)
end(err)
// …
}
// every route at once: http.ListenAndServe(":8080", wshapnin.Middleware(mux))go get github.com/princteq/wshapnin-sdk/go · Go 1.23+ · browser timings (record) are Python-only for now
static HTTP: wshapnin::Timer = wshapnin::Timer::new("http")
.labels(&[("endpoint", "GET /api/products")])
.version("1.3");
static QUERY: wshapnin::Timer = wshapnin::Timer::new("db.query");
async fn products() -> Json<Vec<Product>> {
HTTP.run(async { Json(QUERY.run(load_products()).await) }).await
}
// every route at once: Router::new().layer(wshapnin::axum::layer())cargo add wshapnin · Rust 1.85+ · browser timings (record) are Python-only for now
Documentation and source code: github.com/princteq/wshapnin-sdk
Try it on your services.
Tell us what you run and we open a project for you: 30 days free, with your endpoints. Your services send to it with one variable, the project's key.
30 days free, with your own endpoints.