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

@apogeelabs/hoppity-open-telemetry

v0.1.0

Published

OpenTelemetry tracing and metrics interceptors for hoppity

Readme

@apogeelabs/hoppity-open-telemetry

OpenTelemetry tracing and metrics interceptors for hoppity.

Installation

pnpm add @apogeelabs/hoppity-open-telemetry
# or
npm install @apogeelabs/hoppity-open-telemetry

Peer dependency: @opentelemetry/api@^1.9.0. You provide the SDK, exporter, and configuration — this package only calls the OTel API surface.

Usage

Both withTracing and withMetrics are dual-use: pass them directly as interceptor values (uses defaults) or call them as factories to supply options.

import hoppity from "@apogeelabs/hoppity";
import { withTracing, withMetrics } from "@apogeelabs/hoppity-open-telemetry";

// Direct use — default tracer/meter name "hoppity"
const broker = await hoppity
    .service("order-service", {
        connection: { url: "amqp://localhost" },
        handlers: [myHandler],
        publishes: [MyDomain.events.myEvent],
        interceptors: [withTracing, withMetrics],
    })
    .build();

// Factory use — custom names and options
const broker = await hoppity
    .service("order-service", {
        connection: { url: "amqp://localhost" },
        handlers: [myHandler],
        publishes: [MyDomain.events.myEvent],
        interceptors: [
            withTracing({ tracerName: "order-service", spanPrefix: "msg" }),
            withMetrics({
                meterName: "order-service",
                histogramBuckets: [5, 10, 25, 50, 100, 250],
            }),
        ],
    })
    .build();

Options

TracingOptions

| Option | Type | Default | Description | | ------------ | -------- | -------------- | ------------------------------------------------------------------ | | tracerName | string | "hoppity" | Name passed to trace.getTracer() | | spanPrefix | string | operation kind | Prefix for span names (e.g. "msg""msg:orders.orderCreated") |

MetricsOptions

| Option | Type | Default | Description | | ------------------ | ---------- | ----------------- | --------------------------------------------- | | meterName | string | "hoppity" | Name passed to metrics.getMeter() | | histogramBuckets | number[] | OTel SDK defaults | Histogram bucket boundaries for duration (ms) |

Behaviour

Tracing

  • Inbound: Extracts parent trace context from AMQP headers via propagation.extract(). Starts a span named {prefix}:{domain}.{operationName}. Records exceptions and sets span status.
  • Outbound: Starts a span named publish:{domain}.{operationName}. Injects trace context into AMQP headers so downstream consumers link as child spans.

Metrics

  • Inbound: hoppity.handler.count, hoppity.handler.duration (histogram, ms), hoppity.handler.errors
  • Outbound: hoppity.publish.count, hoppity.publish.duration (histogram, ms), hoppity.publish.errors

Instruments are initialised lazily on first message.

Attributes

| Attribute | Value | | ---------------------------- | --------------------------------- | | messaging.system | "rabbitmq" | | messaging.operation.type | "receive" / "publish" | | messaging.destination.name | Exchange name | | hoppity.domain | Domain name | | hoppity.operation | Operation name | | hoppity.kind | "event" / "command" / "rpc" | | service.name | Service name |

License

ISC