
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
statful-middleware-koa
Advanced tools
A common pattern in koa applications it to gather response times from all received requests, this middleware takes care of collecting common useful metrics automatically.
npm install --save statful-middleware-koa statful-client
yarn add statful-middleware-koa statful-client
const Koa = require("koa");
const app = new Koa();
const Statful = require("statful-client");
const statfulMiddleware = require("statful-middleware-koa");
const statful = new Statful({
/* statful configuration */
});
app.use(statfulMiddleware(statful));
app.listen(3000);
Most of the configuration is done directly in the statful instance. You can read more about the available options directly from the Statful repository.
By default, the follow metrics are collected, with the corresponding tags:
response_time
hostnamemethod: GET, POST, PUT ...statusCode: 200, 400, 404 ...statusCodeCategory
route: Either the route handler's name, the route path or unknown_route. e.g.: /users/:id?statful-middleware-koa is available under the MIT license. See the LICENSE file for more information.
FAQs
Koa middleware to automatically register Statful metrics.
The npm package statful-middleware-koa receives a total of 6 weekly downloads. As such, statful-middleware-koa popularity was classified as not popular.
We found that statful-middleware-koa demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.