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

@goliapkg/sentori-next

v0.2.8

Published

Next.js adapter for Sentori — instrumentation.ts hooks, App Router error boundary, navigation tracing, env-driven provider built on @goliapkg/sentori-react.

Readme

@goliapkg/sentori-next

Next.js (App Router, ≥ 14) adapter for Sentori, built on @goliapkg/sentori-react + @goliapkg/sentori-javascript.

Install

bun add @goliapkg/sentori-next
# or
pnpm add @goliapkg/sentori-next

Set in .env.local:

NEXT_PUBLIC_SENTORI_TOKEN=st_pk_...
[email protected]
NEXT_PUBLIC_SENTORI_ENVIRONMENT=prod

# Optional — server-only token / release if you want to differentiate
# server traffic from browser traffic on the dashboard.
SENTORI_TOKEN=st_pk_...
[email protected]
SENTORI_ENVIRONMENT=prod

Wire it up

Server (instrumentation.ts at project root)

// instrumentation.ts
export { register, onRequestError } from '@goliapkg/sentori-next/instrumentation'

That's it — register() boots the SDK on Node start, and onRequestError captures every server-side request error with route

  • method tags. The register() helper guards on NEXT_RUNTIME === 'nodejs' so the edge runtime doesn't try to load Node-only deps.

Client (app/layout.tsx)

// app/layout.tsx
'use client'
import { clientInit, SentoriProvider } from '@goliapkg/sentori-next/client'

clientInit() // reads NEXT_PUBLIC_SENTORI_*

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        <SentoriProvider config={configFromEnv()}>{children}</SentoriProvider>
      </body>
    </html>
  )
}

App Router error boundary (app/error.tsx)

// app/error.tsx
'use client'
import { useReportNextError } from '@goliapkg/sentori-next/app-router'

export default function Error({
  error,
  reset,
}: {
  error: Error & { digest?: string }
  reset: () => void
}) {
  useReportNextError(error) // captureError once per error instance
  return (
    <div>
      <h2>Something went wrong</h2>
      <button onClick={reset}>Try again</button>
    </div>
  )
}

useReportNextError calls captureError once per error instance and picks up Next's error.digest as a tag so the dashboard can correlate the client report with the server error.

For a global catch-all, drop the same component into app/global-error.tsx.

Navigation breadcrumbs (any layout)

// app/Shell.tsx — client wrapper mounted from app/layout.tsx
'use client'
import { useNextRouter } from '@goliapkg/sentori-next/app-router'

export function Shell({ children }: { children: React.ReactNode }) {
  useNextRouter() // nav breadcrumb on every pathname change
  return <>{children}</>
}

First mount does not emit a breadcrumb; only real pathname transitions are recorded.

What gets captured

| Path | Source tag | |------|------------| | Server route / API throw | source=next.requestError, next.runtime=nodejs\|edge | | Component render error (App Router) | source=react.errorBoundary (via <SentoriErrorBoundary>) | | Browser uncaught error / promise | source= (set by JS SDK hooks) | | useCaptureError(fn) | per-call tags as you pass them |

Edge runtime

onRequestError works in both Node and Edge runtimes — Next forwards the same signature. serverInit() is Node-only because Edge lacks process.on(...) for uncaughtException.

Sub-paths

| Import | Use from | |--------|----------| | @goliapkg/sentori-next/client | App Router client components, clientInit, SentoriProvider, <SentoriErrorBoundary>, hooks | | @goliapkg/sentori-next/server | instrumentation.ts, serverInit, onRequestError | | @goliapkg/sentori-next/instrumentation | one-line instrumentation.ts re-export | | @goliapkg/sentori-next/app-router | useNextRouter, useReportNextError — client-only App Router hooks |

Versioning

Tracks the underlying SDKs: