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

@agentmark-ai/otel

v0.2.0

Published

Group AgentMark traces by session, user, and metadata via OpenTelemetry context. Works with the Vercel AI SDK (v7) and any OTel-instrumented spans.

Downloads

27

Readme

@agentmark-ai/otel

Group AgentMark traces by session, user, tags, and custom metadata using OpenTelemetry context.

It pairs a small wrapper with a span processor:

  • withAgentMark(grouping, fn) — stashes grouping in the active OpenTelemetry context.
  • AgentMarkSpanProcessor — stamps that grouping onto every span started in the scope (using the attribute keys AgentMark reads) and batches them to AgentMark's OTLP endpoint.

It is framework-agnostic: any OpenTelemetry span created in the wrapped scope — Vercel AI SDK calls, HTTP requests, DB queries, custom spans — is grouped. It is especially useful with the Vercel AI SDK v7, where telemetry.metadata no longer reaches spans, so session/user/metadata grouping can't ride it.

Install

npm install @agentmark-ai/otel @opentelemetry/sdk-trace-node

Usage

import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
import { AgentMarkSpanProcessor, withAgentMark } from '@agentmark-ai/otel';

// Once, at startup:
const provider = new NodeTracerProvider({
  spanProcessors: [
    new AgentMarkSpanProcessor({
      apiKey: process.env.AGENTMARK_API_KEY!, // raw key, no "Bearer" prefix
      appId: process.env.AGENTMARK_APP_ID!,
    }),
  ],
});
provider.register();

// Per request — wrap your work:
await withAgentMark(
  { sessionId, userId, tags: ['prod'], metadata: { feature: 'chat' } },
  () => generateText({ model, prompt }), // or any traced work
);

withAgentMark requires an OpenTelemetry context manager to be registered (both NodeTracerProvider#register() and @vercel/otel do this) so the grouping propagates across await.

License

AGPL-3.0-or-later