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

@pgms/radianz-pino-transport

v1.0.0

Published

Pino transport for Radianz — send structured logs directly to the Radianz backend

Downloads

107

Readme

@pgms/radianz-pino-transport

A Pino transport for Radianz — developer activity analytics & observability.

Sends structured logs directly to the Radianz backend over HTTP, aligned with the existing Serilog.Sinks.Radianz ingestion contract.

Features

| Feature | Description | |---|---| | Async Batching | Logs are buffered and sent in configurable batches (default 50 every 5 s) | | Retry with Back-off | Exponential back-off + jitter — survives transient failures | | Drop Policy | Configurable in-memory queue size; oldest events dropped when full | | Structured Logging | Full support for Pino properties, error serialisation & error cause chains | | CJS + ESM | Dual-format build with TypeScript declarations | | Node 18+ | Uses undici for fast HTTP, zero native dependencies |

Installation

npm install @pgms/radianz-pino-transport pino

Quick Start

import pino from "pino";
import { radianzTransport } from "@pgms/radianz-pino-transport";

const logger = pino(
  { level: "info" },
  radianzTransport({
    endpoint: "https://radianz.mycompany.com/api/v1/logs/batch",
    clientId: process.env.RADIANZ_CLIENT_ID!,
    apiKey: process.env.RADIANZ_API_KEY!,
    serviceName: "my-service",
    serviceVersion: "1.2.3",
    environment: "production",
  }),
);

logger.info({ userId: 42 }, "User signed in");
logger.error({ err: new Error("boom") }, "Something broke");

Configuration

| Option | Type | Default | Description | |---|---|---|---| | endpoint | string | required | Radianz ingestion URL (/api/v1/logs/batch) | | clientId | string | required | Client ID for authentication | | apiKey | string | required | API key for authentication | | serviceName | string | — | Application / service name | | serviceVersion | string | — | Application version | | environment | string | — | Environment (e.g. prod, staging) | | flushIntervalMs | number | 5000 | Max time between HTTP flushes | | maxBatchSize | number | 50 | Events per HTTP request | | maxQueueSize | number | 10000 | In-memory queue limit (FIFO drop) | | timeoutMs | number | 30000 | HTTP request timeout | | maxRetries | number | 3 | Retry attempts for transient failures | | baseRetryDelayMs | number | 1000 | Initial retry backoff | | maxRetryDelayMs | number | 30000 | Maximum retry backoff | | headers | Record<string, string> | {} | Additional HTTP headers | | onError | (err: Error) => void | — | Error callback (apiKey never exposed) |

Level Mapping

| Pino | Radianz (Serilog) | |---|---| | trace (10) | Verbose | | debug (20) | Debug | | info (30) | Information | | warn (40) | Warning | | error (50) | Error | | fatal (60) | Fatal |

Authentication

The transport sends ClientId and ApiKey as HTTP headers — identical to the Serilog sink. Obtain credentials from the Radianz dashboard.

Best Practices

  • Always set serviceName, serviceVersion and environment for proper grouping.
  • Keep maxBatchSize between 50–200 and flushIntervalMs between 1–10 s.
  • Use onError to monitor transport failures without crashing your app.
  • The transport calls timer.unref() so it won't keep your process alive.

FAQ

Q: Does it block my application? No. Logs are queued in memory and flushed asynchronously.

Q: What happens if the backend is down? Batches are retried with exponential backoff. After maxRetries failures the batch is dropped and onError is called.

Q: Is the API key logged anywhere? No. The onError callback never receives the API key.

License

MIT