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

@qmilab/lodestar-otel-exporter

v0.5.0

Published

Project the Lodestar event log into OpenTelemetry GenAI spans and export them over OTLP/HTTP — pair the epistemic chain with Langfuse, Phoenix, Jaeger, or Tempo. Part of Lodestar, the trust layer for AI agents.

Downloads

568

Readme

@qmilab/lodestar-otel-exporter

The OpenTelemetry bridge for Lodestar. It projects a session's event log into OTel spans that follow the GenAI semantic conventions and exports them over OTLP/HTTP (JSON) — so the epistemic chain shows up in any OTLP-compatible trace tool: Langfuse, Phoenix, Jaeger, Tempo, Datadog.

Lodestar is not an observability platform. It records what an agent observed, claimed, believed, decided, and what policy allowed; this package hands that record to the tool you already use to look at traces.

It is a read-side, batch exporter: it reads a finished NDJSON event log, projects it, and emits a trace. No SDK, no live in-process instrumentation, no new runtime dependencies — the OTLP/HTTP trace wire format is a small, stable JSON shape we build directly.

Span model

Action-centric — the shape Langfuse and Phoenix render natively:

trace = session
└─ span: invoke_agent (the session)
   ├─ event: observation.recorded
   ├─ event: belief.adopted        (truth_status, sensitivity, confidence …)
   ├─ span:  execute_tool fs.read  [ok]
   ├─ span:  execute_tool git.push [error: policy denied]
   └─ event: firewall.belief.transitioned

Each governed Action becomes an execute_tool span (gen_ai.operation.name, gen_ai.tool.name, gen_ai.tool.call.id) carrying Lodestar's policy verdict, trust level, blast radius, and outcome as lodestar.* attributes. Observations, beliefs, decisions, and firewall transitions ride as span events on the session root. Span and trace ids are derived deterministically from the project, session, and action ids, so re-exporting the same log produces the same trace (and two projects that reuse a session id stay distinct).

The sensitivity gate

Content above a configured sensitivity ceiling (default internal) is never exported: the span or event is still emitted with its structural metadata (ids, timing, type, status) and the payload is dropped, leaving the envelope's payload_hash in its place. A secret-sensitivity belief shows up in your trace tool as "a secret belief existed and backed this decision" — never as its content. This honours the locked v0.2 invariant (docs/architecture/v02-delta.md §3).

Usage

# Print the OTLP JSON for a session (no collector needed)
lodestar otel export <session-id> --stdout

# Push to a collector / Langfuse / Phoenix OTLP endpoint
lodestar otel export <session-id> --endpoint http://localhost:4318

# Raise the ceiling, add auth headers, write to a file
lodestar otel export <session-id> \
  --sensitivity-ceiling confidential \
  --header "authorization=Bearer $TOKEN" \
  --out trace.json

Programmatically:

import { exportSession } from "@qmilab/lodestar-otel-exporter"

const summary = await exportSession({
  sessionId: "my-session",
  endpoint: "http://localhost:4318",
  sensitivityCeiling: "internal",
})
// → { trace_id, span_count, event_count, redacted_count }

License

Apache-2.0