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

@tell-rs/node

v0.3.2

Published

Tell SDK for Node.js — analytics events and structured logging

Downloads

359

Readme

@tell-rs/node

Tell SDK for Node.js — analytics events and structured logging.

Install

# npm
npm install @tell-rs/node

# yarn
yarn add @tell-rs/node

# pnpm
pnpm add @tell-rs/node

# bun
bun add @tell-rs/node

Quick Start

import { Tell } from "@tell-rs/node";

const tell = new Tell("feed1e11feed1e11feed1e11feed1e11");

// Track an event
tell.track("user_123", "Sign Up", { plan: "pro" });

// Identify a user
tell.identify("user_123", { name: "Alice", email: "[email protected]" });

// Structured logging
tell.logInfo("User signed up", { userId: "user_123" });

// Flush and close before process exit
await tell.close();

API

new Tell(apiKey, options?)

Creates a new Tell instance. Each instance manages its own batching, transport, and lifecycle.

const tell = new Tell("feed1e11feed1e11feed1e11feed1e11", {
  // All options below are optional:
  service: "api-server",                  // stamped on every event and log
  endpoint: "https://collect.tell.app",  // default
  batchSize: 100,                         // events per batch
  flushInterval: 10_000,                  // ms between auto-flushes
  maxRetries: 3,                          // retry attempts on failure
  closeTimeout: 5_000,                    // ms to wait on close()
  networkTimeout: 30_000,                 // ms per HTTP request
  logLevel: "info",                       // "error" | "warn" | "info" | "debug"
  source: os.hostname(),                  // source identifier
  disabled: false,                        // disable all tracking
  maxQueueSize: 1000,                     // max queued items
  gzip: false,                            // gzip request bodies
  onError: (err) => console.error(err),   // error callback
  beforeSend: (event) => event,           // transform/filter events
  beforeSendLog: (log) => log,            // transform/filter logs
});

Events

tell.track(userId, eventName, properties?)
tell.identify(userId, traits?)
tell.group(userId, groupId, properties?)
tell.revenue(userId, amount, currency, orderId, properties?)
tell.alias(previousId, userId)

Logging

tell.log(level, message, data?)

// Convenience methods
tell.logEmergency(message, data?)
tell.logAlert(message, data?)
tell.logCritical(message, data?)
tell.logError(message, data?)
tell.logWarning(message, data?)
tell.logNotice(message, data?)
tell.logInfo(message, data?)
tell.logDebug(message, data?)
tell.logTrace(message, data?)

Service Scoping

Use withService() to create a scoped view that stamps a different service name on all events and logs, without affecting the parent instance:

const tell = new Tell("feed1e11feed1e11feed1e11feed1e11", { service: "api" });

const payments = tell.withService("payments");
payments.logError("Charge failed", { code: 402 });
payments.track("u_1", "Payment Failed");

// Parent instance is unaffected
tell.logInfo("Still tagged as api");

Scoped instances share the parent's batching and transport — call tell.flush() or tell.close() as usual.

Lifecycle

await tell.flush()    // flush all pending events and logs
await tell.close()    // flush + shut down (call before process exit)

Config Presets

import { Tell, development, production } from "@tell-rs/node";

// Development: localhost:8080, small batches, debug logging
const dev = new Tell("feed1e11feed1e11feed1e11feed1e11", development());

// Production: default endpoint, error-only logging
const prod = new Tell("feed1e11feed1e11feed1e11feed1e11", production());

Redaction

Use the built-in redact() factory to strip sensitive data before events leave your server:

import { Tell, redact, redactLog, SENSITIVE_PARAMS } from "@tell-rs/node";

const tell = new Tell("feed1e11feed1e11feed1e11feed1e11", {
  beforeSend: redact({
    dropRoutes: ["/health", "/readyz"],
    stripParams: SENSITIVE_PARAMS,
    redactKeys: ["email", "phone", "ssn"],
  }),
  beforeSendLog: redactLog({
    redactKeys: ["password", "credit_card"],
  }),
});

See the docs site for more beforeSend patterns.

License

MIT