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

@unhandled/instrumentation-bentocache

v0.1.15

Published

Bentocache tracing for Unhandled

Readme

@unhandled/instrumentation-bentocache

Traces Bentocache operations, including the ones issued through @adonisjs/cache (which drives a BentoCache underneath). Needs bentocache ^1.6.0 installed in your app.

Install

npm i @unhandled/instrumentation-bentocache bentocache

Register

With the Unhandled AdonisJS agent:

import { bentocache } from '@unhandled/instrumentation-bentocache/integration'

export default defineConfig({
  integrations: [bentocache()],
})

Installing the package does nothing until the integration is registered. Leave it out, or pass bentocache({ enabled: false }), to turn it off. If bentocache cannot be resolved, setup throws a BentocacheNotInstalledError.

Standalone, register the instrumentation yourself and import bentocache after it (ESM needs the import-in-the-middle loader hook for the internal-span suppression below):

import { BentocacheInstrumentation } from '@unhandled/instrumentation-bentocache'

registerInstrumentations({ instrumentations: [new BentocacheInstrumentation()] })

If your module hooks miss bentocache, call instrumentation.patch(await import('bentocache')) yourself.

Options

| Option | Default | Effect | | ------------------- | ------- | ----------------------------------------------------------------------- | | enabled | true | Integration only. false skips the integration. | | requireParentSpan | false | Only create spans when a span is already active. | | includeKeys | true | false leaves cache.key and cache.keys off every span. | | keySanitizer | masks ids | (key) => string \| undefined. Replaces the default sanitizer entirely. |

The default sanitizer splits the key on : and replaces every UUID, all-digit and hex-id (8+ hex characters) segment with *, so bentocache:users:123 becomes bentocache:users:*. Bentocache reports the key with its configured prefix.

Bentocache's own L2 (Redis, database) and bus calls run with tracing suppressed, so they do not produce spans of their own. This relies on wrapping the BentoCache constructor; it is skipped, with a diagnostics warning, if the module namespace is read-only.

Spans

One INTERNAL span per operation, named cache.<operation>: cache.get, cache.set, cache.getOrSet, cache.factory, cache.delete, cache.deleteMany, cache.clear, cache.expire. Spans started while another cache operation is running (the factory and write of a getOrSet) are children of it. Failures record the exception and set ERROR status.

| Attribute | When | | ----------------- | -------------------------------------------------------------- | | cache.operation | always | | cache.store | always | | cache.key | includeKeys and the operation has a key | | cache.keys | includeKeys and the operation has several keys (deleteMany) | | cache.hit | get and getOrSet | | cache.tier | get hits: l1 or l2 | | cache.graced | get hits: whether the value came from the grace period |

For AI agents

A coding agent can install this package, check that its data arrives and fix the errors it reports through the Unhandled MCP server at https://unhandled.net/mcp. In Claude Code, the Unhandled plugin adds that server plus skills for instrumenting a service, fixing a production error with a failing test first and verifying a deploy:

claude plugin marketplace add treboryx/unhandled
claude plugin install unhandled@unhandled

Codex, Cursor, Gemini CLI and other agents connect to the same URL. Coding agents has the setup for each one and an AGENTS.md section to add to your repository.