New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@juriadams/telemetry

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@juriadams/telemetry

Lightweight and dead-simple library for collecting telemetry data.

latest
npmnpm
Version
0.0.2
Version published
Weekly downloads
3
-57.14%
Maintainers
1
Weekly downloads
 
Created
Source

@juriadams/telemetry

Lightweight and dead-simple library for collecting telemetry data.

Usage

First, install the package using your dependency manager of choice (bun, npm, pnpm, ...):

bun add @juriadams/telemetry

Then,

import { Hono } from "hono";
import { Trace } from "@juriadams/telemetry";

const app = new Hono();

app.get("/users/:id", async (c) => {
  const trace = new Trace({
    name: "get-user",
    attributes: {
      method: c.req.method,
      path: c.req.path,
      userId: c.req.param("id"),
    },
  });

  const span = trace.createSpan({
    name: "database-lookup",
    attributes: {
      table: "users",
    },
  });

  const user = await db.getUser(c.req.param("id"));

  trace.end();

  // Log or export the Trace.
  console.log(trace.serialize());

  return c.json({
    data: user,
    error: null,
  });
});

export default app;

FAQs

Package last updated on 19 Oct 2025

Related posts