openllmetry-js  by traceloop

TS/JS observability for LLM apps, built on OpenTelemetry

created 1 year ago
344 stars

Top 81.6% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides open-source observability for JavaScript/TypeScript LLM applications, built on OpenTelemetry standards. It targets developers seeking to integrate LLM-specific tracing and metrics into their existing observability stacks (Datadog, Honeycomb, etc.), offering detailed insights into LLM interactions and vector database usage.

How It Works

OpenLLMetry-JS extends OpenTelemetry with custom instrumentations for popular LLM providers (OpenAI, Anthropic, Cohere, etc.) and vector databases (Pinecone, Chroma, Qdrant). It leverages the OpenTelemetry semantic conventions, ensuring compatibility with standard observability backends. A provided SDK simplifies integration by automatically initializing tracing for LLM calls and vector database operations.

Quick Start & Requirements

  • Install SDK: npm install --save @traceloop/node-server-sdk
  • Initialize: Add import * as traceloop from "@traceloop/node-server-sdk"; traceloop.initialize(); to your application entry point.
  • Dependencies: Node.js, npm/yarn.
  • Docs: https://www.traceloop.com/docs

Highlighted Details

  • Semantic conventions are now part of OpenTelemetry.
  • Instruments LLM providers: OpenAI, Azure OpenAI, Anthropic, Cohere, Vertex AI, Bedrock.
  • Instruments Vector DBs: Pinecone, Chroma, Qdrant.
  • Integrates with frameworks like LangChain and LlamaIndex.
  • Supports export to numerous observability backends including Datadog, Honeycomb, Grafana Tempo, and OpenTelemetry Collector.

Maintenance & Community

  • Maintained by Traceloop.
  • Community support via Slack and GitHub Discussions.
  • Active development indicated by recent semantic convention contributions to OpenTelemetry.
  • Twitter: @traceloop

Licensing & Compatibility

  • Apache 2.0 License.
  • Permissive license suitable for commercial use and integration with closed-source applications.

Limitations & Caveats

Some instrumentations (Replicate, Weaviate, Milvus) are marked as "in progress" (⏳), indicating potential incompleteness or ongoing development. The SDK collects anonymous usage telemetry by default, which can be opted out of.

Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
55
Issues (30d)
3
Star History
34 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.