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

@drawbridge/drawbridge-telemetry

v0.0.19

Published

Shared observability helpers for the drawbridge-* monorepo. Provides Sentry scope correlation across HTTP, BullMQ workers, and MongoDB change streams. Pino logger + event emitter arrive in Stage 2; OpenTelemetry SDK in Stage 4.

Readme

@drawbridge/drawbridge-telemetry

Shared observability helpers for the drawbridge-* monorepo. Provides Sentry scope correlation across HTTP, BullMQ workers, and MongoDB change streams. Pino logger + event emitter arrive in Stage 2; OpenTelemetry SDK in Stage 4.

Install

npm install --save-exact @drawbridge/drawbridge-telemetry

Requires @sentry/core >= 10 as a peer dependency. Backend services satisfy this via @sentry/node; Next.js apps via @sentry/nextjs.

Subpaths

| Subpath | Purpose | | --- | --- | | @drawbridge/drawbridge-telemetry | Core: attachProcessHandlers, withTraceScope, currentTraceId | | @drawbridge/drawbridge-telemetry/express | expressContextMiddleware for Express apps | | @drawbridge/drawbridge-telemetry/bullmq | wrapWorkerHandler, enqueueFromWorker, attachQueueEventsLogger | | @drawbridge/drawbridge-telemetry/stream | enqueueWithTrace for MongoDB change-stream handlers |

Naming conventions

  • Event names<noun>.<verb> past tense, lowercase, dot-separated. Verbs match drawbridge-api's action status vocabulary (processing / succeeded / failed; never pending / completed). Nouns are singular and match Mongo collection names.
  • Tag keys — camelCase. Canonical traceId everywhere; X-Request-Id header stays for wire compat.
  • Event envelope{ name, traceId, userId, organizationId, data: {...}, createdAt }.
  • Reserved keys in job.data__traceId (double-underscore prefix marks it as infrastructure data, not domain data).

Error context

createLogger().error( error, data ) sends data to Sentry as well as to stdout. Domain meta becomes tags when it is a short scalar (indexed, so you can filter and group on it) and extra otherwise:

logger.error( error, { cycleId : '2026-08-18', step : 'recommend' } );
// Sentry issue carries tags: { cycleId: '2026-08-18', step: 'recommend' }

Keys Sentry owns — user, level, extra, contexts, tags, fingerprint, propagationContext, and the EventHint keys — pass through untouched, and an explicit tags.step beats an inferred one. A call that passes only Sentry's own keys behaves exactly as it always did.

Before 0.0.18 this silently dropped everything: Sentry reads the second argument as an EventHint unless it carries one of its own scope keys, so { step : 'recommend' } was discarded without a warning, on every service. If you are debugging an issue captured by an older build, the meta only ever reached stdout — correlate the Sentry logs stream by timestamp instead.

TraceId flow

HTTP request                  Mongo change event
     │                              │
     ▼ req.id (randomUUID)          ▼ _id._data (resume token)
expressContextMiddleware       enqueueWithTrace
     │                              │
     │ scope.setTag('traceId',_)    │ job.data.__traceId
     ▼                              ▼
Sentry events for request     BullMQ worker
                                    │ wrapWorkerHandler reads
                                    │ job.data.__traceId
                                    ▼
                              scope.setTag('traceId',_)
                                    │
                                    ▼
                              Downstream enqueues
                              via enqueueFromWorker
                              forward active scope's traceId

For cron-style repeatable BullMQ jobs (no parent request or change event), synthesize a __traceId at enqueue time — pass it via data.__traceId to enqueueFromWorker.

Build & publish

npm run build    # tsup + npm publish

Bump version in package.json before publishing.