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

@noetaris/harness-otel

v0.3.2

Published

OpenTelemetry observer bridge for @noetaris/harness

Readme

@noetaris/harness-otel

OpenTelemetry observer bridge for @noetaris/harness.

Overview

@noetaris/harness-otel bridges the harness Observer telemetry API to OpenTelemetry, following the OpenTelemetry GenAI semantic conventions. It translates harness lifecycle events into OTel spans and metrics, giving you distributed tracing and token usage metrics with zero changes to your agent code.

Takes @opentelemetry/api as a peer dependency — works with any OTel SDK implementation (Node SDK, collector exporters, etc.).

Installation

pnpm add @noetaris/harness-otel

Peer dependencies:

pnpm add @noetaris/harness @opentelemetry/api

Requires Node.js ≥ 22.

Usage

import { createOtelObserver } from '@noetaris/harness-otel'
import { trace, metrics } from '@opentelemetry/api'

const observer = createOtelObserver(
  trace.getTracer('my-agent'),
  { meterProvider: metrics.getMeterProvider() },
)

h.observe(observer)

API

createOtelObserver(tracer, options?)

Returns an Observer that maps harness events to OTel spans and metrics, named after the GenAI semantic conventions.

Spans produced:

| Span | Kind | Opened on / closed on | |------|------|-----------------------| | invoke_agent {agentId} | root | one per agent.run(); carries gen_ai.agent.id and gen_ai.conversation.id | | harness.step {stepName} | child | per step; carries gen_ai.step.name | | chat {modelId} | INTERNAL | opened on "llm.request", closed on "llm.response"; carries model/provider/token attributes | | execute_tool {toolName} | INTERNAL | opened on "tool.call", closed on "tool.result"; carries gen_ai.tool.name |

A run paused on an interrupt closes its in-flight step and root spans (via onInterrupt + onRunEnd); the next agent.run() on the same observer starts a fresh root span.

Metrics (requires options.meterProvider):

| Metric | Instrument | Unit | Recorded from | |--------|-----------|------|---------------| | gen_ai.client.token.usage | histogram | {token} | input/output tokens on each "llm.response" | | gen_ai.client.operation.duration | histogram | s | agent invocation duration on onRunEnd |

Options:

| Option | Type | Description | |--------|------|-------------| | parentContext | Context | OTel context for the root span. Defaults to context.active(). | | meterProvider | MeterProvider | Enables metrics. Omit to skip metric recording. | | attributes | Attributes | Extra attributes merged onto the root span (built-in attributes win on conflict). | | captureInputs | boolean | Serialise request messages into a gen_ai.content.prompt span event. Default false. | | captureOutputs | boolean | Serialise response output into a gen_ai.content.completion span event. Default false. | | captureToolIO | boolean | Serialise tool input/result into gen_ai.tool.input/gen_ai.tool.output span events. Default false. | | maxContentLength | number | Truncation limit for any captured content payload. Default 8192. |

Related Packages

License

MIT