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

@logbrew/bullmq

v0.1.1

Published

BullMQ tracing helpers for the public LogBrew JavaScript SDK.

Readme

@logbrew/bullmq

BullMQ tracing helpers for the public LogBrew JavaScript SDK.

Use this package when your Node.js service already uses BullMQ and you want producer and worker spans correlated by W3C traceparent without global patching.

Install

This package is source-only until its first npm release. The npm and pnpm commands below require the package to be available on npm; use a local checkout when evaluating it before release.

npm install @logbrew/sdk @logbrew/node @logbrew/bullmq bullmq
pnpm add @logbrew/sdk @logbrew/node @logbrew/bullmq bullmq

Configure LogBrew with a project-scoped server ingest key for SDK ingest.

Producer and Worker

import { Queue, Worker } from "bullmq";
import { createLogBrewNodeClient } from "@logbrew/node";
import {
  bullMqQueueAddWithLogBrewSpan,
  instrumentLogBrewBullMqProcessor,
  instrumentLogBrewBullMqQueue,
  withLogBrewBullMqProcessor
} from "@logbrew/bullmq";

const client = createLogBrewNodeClient({
  serverApiKey: process.env.LOGBREW_SERVER_API_KEY,
  sdkName: "orders-worker",
  sdkVersion: "1.0.0"
});

const redisConnection = createAppRedisConnection();
const queue = new Queue("orders", { connection: redisConnection });

await bullMqQueueAddWithLogBrewSpan(queue, "charge-card", { orderId: "ord_123" }, {}, {
  client
});

new Worker("orders", withLogBrewBullMqProcessor(async (job) => {
  await chargeCard(job.data.orderId);
}, {
  client
}));

bullMqQueueAddWithLogBrewSpan() and bullMqQueueAddBulkWithLogBrewSpan() wrap app-owned queue calls, add one producer span, and merge one normalized LogBrew traceparent into BullMQ opts.telemetry.metadata. withLogBrewBullMqProcessor() extracts only that LogBrew trace context, creates one consumer span, and rethrows application failures.

If you prefer queue-level setup over wrapping every producer call, patch only the queue instance your app owns:

const logbrewQueue = instrumentLogBrewBullMqQueue(queue, { client });

await queue.add("charge-card", { orderId: "ord_123" });
await queue.addBulk([
  { name: "send-receipt", data: { orderId: "ord_123" } }
]);

logbrewQueue.uninstall();

instrumentLogBrewBullMqQueue() wraps that queue object's add() and addBulk() methods, preserves the original methods for uninstall(), and rejects duplicate LogBrew instrumentation on the same queue instance.

For NestJS WorkerHost processors or other class-owned processor methods, wrap only the processor instance your app owns:

class OrdersProcessor {
  async process(job) {
    await chargeCard(job.data.orderId);
  }
}

const processor = new OrdersProcessor();
const logbrewProcessor = instrumentLogBrewBullMqProcessor(processor, {
  client,
  queueName: "orders"
});

await processor.process(job);
logbrewProcessor.uninstall();

instrumentLogBrewBullMqProcessor() preserves this, keeps extra processor arguments such as locks or abort signals, creates the same privacy-bounded consumer span as withLogBrewBullMqProcessor(), and puts the original method back on uninstall().

Privacy Defaults

  • No job payloads, return values, Redis connection strings, headers, or full URLs are captured.
  • Malformed opts.telemetry.metadata is ignored for propagation instead of breaking the job.
  • Worker exceptions record type-only span events through @logbrew/node; exception messages and stacks are not added by these helpers.
  • The package does not patch BullMQ globally, patch NestJS decorators, create queues, own Redis connections, or open support tickets.