Skip to content
reaatechREAATECH

reaatech/otel-cost-exporter

0Last commit: May 12, 2026GitHub →

These packages convert OpenTelemetry GenAI semantic convention spans into real-time USD cost metrics. They solve the problem of tracking LLM usage expenses by providing bundled, pre-validated pricing tables for major providers that update automatically with each release. The system functions as either an in-process `SpanProcessor` for Node.js applications or a standalone OTLP collector, allowing you to integrate cost tracking directly into existing observability pipelines.

Packages

5 packages

@reaatech/otel-cost-exporter

pending npm
Calculates real-time LLM usage costs by processing OpenTelemetry GenAI semantic convention spans. It provides a `SpanProcessor` for integration into Node.js OTel SDKs or a standalone collector service, using bundled pricing tables to export cost metrics via Prometheus, OTLP, or JSON.
status
awaiting publish

@reaatech/otel-cost-exporter-calculator

pending npm
Calculates GenAI token costs in USD by normalizing model names and processing token counts from OpenTelemetry semantic convention spans. It provides a `CostCalculator` class that integrates with a pricing table, an LRU cache, and a model normalizer to handle complex pricing logic like prompt caching and provider-specific model variants.
status
awaiting publish

@reaatech/otel-cost-exporter-cli

pending npm
Provides a command-line interface to manage OTLP-based cost tracking, including running an OTLP collector service, validating pricing table schemas, and generating cost reports from trace data. It serves as the primary utility for configuring and interacting with the otel-cost-exporter ecosystem.
status
awaiting publish

@reaatech/otel-cost-exporter-core

pending npm
Provides shared TypeScript types, Zod schemas, and GenAI semantic conventions for modeling and validating LLM cost data. It serves as the foundational library for the otel-cost-exporter ecosystem, requiring `zod` and `pino` at runtime.
status
awaiting publish

@reaatech/otel-cost-exporter-pricing

pending npm
Provides a lookup interface for LLM token pricing across major providers using bundled, versioned YAML data. It exports functions to load these datasets and instantiate a `PricingTable` object that supports exact and wildcard model matching.
status
awaiting publish

Comments

Sign in with GitHub to comment and vote.

Loading comments…