npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apitally/serverless

v0.2.1

Published

Simple API monitoring & analytics for REST APIs running on serverless platforms (e.g. Cloudflare Workers).

Readme

Apitally SDK for Cloudflare Workers

Tests Codecov npm

Apitally is a simple API monitoring and analytics tool that makes it easy to understand API usage, monitor performance, and troubleshoot issues. Get started in minutes by just adding a few lines of code and a Logpush job.

Learn more about Apitally on our 🌎 website or check out the 📚 documentation.

This SDK is for APIs running on Cloudflare Workers and relies on Logpush to send data to Apitally.

Key features

API analytics

Track traffic, error and performance metrics for your API, each endpoint and individual API consumers, allowing you to make informed, data-driven engineering and product decisions.

Request logs

Drill down from insights to individual API requests or use powerful search and filters to find specific requests. View correlated application logs for a complete picture of each request, making troubleshooting faster and easier.

Error tracking

Understand which validation rules in your endpoints cause client errors. Capture error details and stack traces for 500 error responses.

API monitoring & alerts

Get notified immediately if something isn't right using custom alerts and synthetic uptime checks. Alert notifications can be delivered via email, Slack and Microsoft Teams.

Supported frameworks

| Framework | Supported versions | Setup guide | | ------------------------------------------ | ------------------ | --------------------------------------------------------------------- | | Hono | 4.x | Link |

Apitally also supports many other web frameworks in JavaScript, Python, Go, .NET and Java via our other SDKs.

Getting started

If you don't have an Apitally account yet, first sign up here.

1. Create app in Apitally

Create an app in the Apitally dashboard and select Hono (Cloudflare Workers) as your framework. You'll see detailed setup instructions, which also include your client ID.

2. Create Logpush job

Log in to the Cloudflare dashboard and navigate to Analytics & Logs > Logpush. Create a Logpush job with the following settings:

| Setting | Value | | ---------------------------- | ---------------------------------------------------------------------------------- | | Destination | HTTP destination | | HTTP endpoint | https://hub.apitally.io/v2/{client-id}/{env}/logpush | | Dataset | Workers trace events | | If logs match... | Filtered logs: EventType equals fetch and ScriptName equals {your-worker-name} | | Send the following fields... | General: Event, EventTimestampMs, Logs |

In the HTTP endpoint, replace {client-id} with your app's client ID and {env} with the environment (e.g. prod or dev). In the filter criteria, replace {your-worker-name} with the name of your Worker, as specified in your Wrangler config.

3. Configure Worker

Enable Workers Logs and Logpush in your wrangler.toml configuration file:

logpush = true

[observability]
enabled = true
head_sampling_rate = 1

[observability.logs]
invocation_logs = true

4. Add middleware

Install the SDK:

npm install @apitally/serverless

Then add the Apitally middleware to your Hono application using the useApitally function:

import { Hono } from "hono";
import { useApitally } from "@apitally/serverless/hono";

const app = new Hono();

useApitally(app, {
  logRequestHeaders: true,
  logRequestBody: true,
  logResponseHeaders: true,
  logResponseBody: true,
});

// Ensure route handlers are registered after useApitally()

For further instructions, see our setup guide for Hono on Cloudflare Workers.

See the SDK reference for all available configuration options, including how to mask sensitive data, customize request logging, and more.

Getting help

If you need help please create a new discussion on GitHub or email us at [email protected]. We'll get back to you as soon as possible.

License

This library is licensed under the terms of the MIT license.