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

@open-infra/telemetry-server

v0.2.0

Published

Node.js OpenTelemetry runtime with auto-instrumentation, request context, policy, and explicit shutdown.

Readme

@open-infra/telemetry-server

Node.js telemetry with one trace, log, and metric provider, bounded queues, privacy filtering, request context, and explicit shutdown. Uses official OpenTelemetry providers and OTLP/HTTP protobuf exporters.

Install

npm install @open-infra/telemetry-server

ESM only, with TypeScript declarations. Requires Node.js 20.11 or newer. Framework adapters are separate packages such as @open-infra/telemetry-express.

Start before importing the application

// instrumentation.mjs
import { createServerTelemetry } from '@open-infra/telemetry-server';

export const telemetry = createServerTelemetry({
  serviceName: 'orders-api',
  projectId: 'commerce',
  environment: 'production',
  exporter: {
    traceEndpoint: 'http://127.0.0.1:4318/v1/traces',
    logEndpoint: 'http://127.0.0.1:4318/v1/logs',
    metricEndpoint: 'http://127.0.0.1:4318/v1/metrics',
  },
});
await telemetry.start();
node --import ./instrumentation.mjs ./app.mjs

Import the same telemetry instance from application modules. Do not create a runtime per request. The default instrumentation patches Node HTTP; instrumentations: { auto: false } disables automatic instrumentation. auto: 'all' additionally requires the optional @opentelemetry/auto-instrumentations-node peer.

import { telemetry } from './instrumentation.mjs';

telemetry.logger.info('order.accepted', { 'order.channel': 'web' });
telemetry.telemetryMetrics.counter('orders.accepted', 1, { channel: 'web' });
const span = telemetry.tracer.startSpan('orders.process');
try {
  // Perform application work.
} finally {
  span.end();
}

startSpan does not make the span active. Use OpenTelemetry active-context APIs when child spans and correlated logs must share its context.

Shutdown and delivery

Stop accepting work, drain application requests, then call await telemetry.shutdown({ timeoutMs: 10000 }). Use forceFlush() for an explicit flush while running. installTelemetrySignalHandlers is available for signal-driven draining; it never calls process.exit().

Queues are memory-only and bounded. Crashes, saturation, and failed exports can lose data. Export success acknowledges the configured receiver, not final backend persistence. Deploy a durable Collector or Teleproxi spool when needed.

Configuration

  • Server headers may contain receiver credentials; keep them out of browser bundles.
  • Built-in exporter timeouts must fit their batch/metric-reader deadlines.
  • policy controls redaction, URL/header capture, body allowlists, and metric dimensions.
  • diagnostics.snapshot() reports queues, drops, export failures, and lifecycle state.
  • Automatic resource detection uses environment, process, and host detectors; explicit resource configuration takes precedence.
  • The /register preload reads the documented environment-variable subset. Calling createServerTelemetry uses explicit configuration and its defaults.

Operations · Logging

Apache-2.0.