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

@meistrari/otel

v1.8.2

Published

A lightweight OpenTelemetry library for Node.js applications with built-in support for Hono and Elysia frameworks.

Readme

@meistrari/otel

A lightweight OpenTelemetry library for Node.js applications with built-in support for Hono and Elysia frameworks.

Features

  • 🚀 Easy setup with minimal configuration
  • 📊 Automatic instrumentation for Node.js applications
  • 🔥 Built-in support for Hono and Elysia frameworks
  • 📈 OTLP HTTP exporters for traces and metrics
  • 🌍 Environment-based configuration
  • 🎯 TypeScript support

Installation

npm install @meistrari/otel

Peer Dependencies

For framework-specific usage, install the corresponding peer dependencies:

# For Hono
npm install @hono/otel

# For Elysia
npm install @elysiajs/opentelemetry

Environment Variables

Set the following environment variables:

SERVICE_NAME=my-service
SERVICE_VERSION=1.0.0
ENVIRONMENT=production

Usage

Basic Bun Application

For Bun applications, you can use the bunfig.toml configuration file to automatically preload the library:

Create a bunfig.toml file in your project root:

preload = [ "@meistrari/otel" ]

Then simply run your application:

# Set environment variables
export SERVICE_NAME=my-bun-app
export SERVICE_VERSION=1.0.0
export ENVIRONMENT=production

# Run with automatic preload
bun run server.ts

Alternatively, you can use the command line preload option:

bun --preload @meistrari/otel server.ts

Hono Integration

Using with Preload Script

# Set environment variables
export SERVICE_NAME=my-hono-app
export SERVICE_VERSION=1.0.0
export ENVIRONMENT=production

# Start with preload
bun --preload @meistrari/otel server.js

Then add the Hono middleware in your app:

import { Hono } from 'hono'
import { serve } from '@hono/node-server'
import honoOtel from '@meistrari/otel/hono'

const app = new Hono()

// Apply OpenTelemetry middleware
app.use('*', honoOtel)

app.get('/', (c) => {
  return c.text('Hello Hono!')
})

app.get('/users/:id', async (c) => {
  const id = c.req.param('id')
  // This will be automatically traced
  const user = await getUserById(id)
  return c.json(user)
})

const port = 3000
console.log(`Server is running on port ${port}`)

serve({
  fetch: app.fetch,
  port,
})

Elysia Integration

Using with Preload Script

# Set environment variables
export SERVICE_NAME=my-elysia-app
export SERVICE_VERSION=1.0.0
export ENVIRONMENT=production

# Start with preload
bun --preload @meistrari/otel server.ts

Then add the Elysia middleware in your app:

import { Elysia } from 'elysia'
import { instrumentationMiddleware } from '@meistrari/otel/elysia'

const app = new Elysia()
  // Apply OpenTelemetry middleware
  .use(instrumentationMiddleware)
  .get('/', () => 'Hello Elysia!')
  .get('/users/:id', async ({ params: { id } }) => {
    // This will be automatically traced
    const user = await getUserById(id)
    return user
  })
  .listen(3000)

console.log(`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`)

Advanced Configuration

Custom OTLP Endpoints

Set these environment variables to customize OTLP endpoints:

OTEL_EXPORTER_OTLP_ENDPOINT=https://your-otlp-endpoint.com
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://your-traces-endpoint.com
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=https://your-metrics-endpoint.com

Troubleshooting

Common Issues

  1. Missing environment variables: Ensure SERVICE_NAME, SERVICE_VERSION, and ENVIRONMENT are set.

  2. Instrumentation not working: Make sure to import @meistrari/otel at the very top of your application or use the preload script.