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

@jessitronica/honeycomb-trace-spans

v1.0.0

Published

A command-line tool to retrieve all spans in a trace from Honeycomb

Readme

honeycomb-trace-spans

A command-line tool to retrieve all spans in a trace from Honeycomb.

Installation

You can install this package globally:

npm install -g honeycomb-trace-spans

Or use it with npx:

npx honeycomb-trace-spans --trace-id <trace_id>

Usage

Get a Honeycomb API Key for your team and environment.

export HONEYCOMB_API_KEY=your_api_key
honeycomb-trace-spans --trace-id <trace_id> [--time-range <seconds>]
honeycomb-trace-spans --trace-id <trace_id> --start-time <unix_timestamp> --end-time <unix_timestamp>

Parameters

  • --trace-id: The trace ID to retrieve spans for (required)
  • --time-range: Time range in seconds to look for spans (optional, default: 3600 seconds/1 hour)
  • --start-time: Start time as Unix timestamp in seconds (optional, must be used with --end-time)
  • --end-time: End time as Unix timestamp in seconds (optional, must be used with --start-time)

Environment Variables

  • HONEYCOMB_API_KEY: Your Honeycomb API key (required)
  • HONEYCOMB_API_ENDPOINT: Custom API endpoint (optional, default: https://api.honeycomb.io)

Examples

# Set your Honeycomb API key
export HONEYCOMB_API_KEY=your_api_key

# Retrieve spans for a trace with default time range (1 hour)
honeycomb-trace-spans --trace-id abcd1234efgh5678

# Retrieve spans for a trace with a custom time range (last 24 hours)
honeycomb-trace-spans --trace-id abcd1234efgh5678 --time-range 86400

# Retrieve spans for a trace with an absolute time range
honeycomb-trace-spans --trace-id abcd1234efgh5678 --start-time 1617235200 --end-time 1617321600

# With an absolute time range from yesterday to now
honeycomb-trace-spans --trace-id abcd1234efgh5678 --start-time $(date -v-1d +%s) --end-time $(date +%s)

Output

The script outputs structured JSON data that's optimized for agent consumption, while still providing the trace URL for human use.

Example output:

{
  "summary": {
    "traceId": "abcd1234efgh5678",
    "spanCount": 16,
    "services": ["service-a", "service-b", "service-c"],
    "rootSpans": 1,
    "timeRange": {
      "start": 1617235200,
      "end": 1617321600
    },
    "traceUrl": "https://ui.honeycomb.io/team/environments/env/trace?trace_id=abcd1234efgh5678&trace_start_ts=1617235200&trace_end_ts=1617321600"
  },
  "spans": [
    {
      "spanId": "span1",
      "parentId": "ROOT",
      "name": "request",
      "service": "service-a",
      "duration": 100.5,
      "attributes": {}
    }
    // ... more spans ...
  ]
}

License

MIT