MCPcopy
hub / github.com/traceloop/openllmetry

github.com/traceloop/openllmetry @0.62.1 sqlite

repository ↗ · DeepWiki ↗ · release 0.62.1 ↗
6,461 symbols 29,585 edges 696 files 2,273 documented · 35%
README

Open-source observability for your LLM application

Get started » Slack | Docs | Website

OpenLLMetry is released under the Apache-2.0 License git commit activity PRs welcome! Slack community channel Traceloop Twitter

🎉 New: Our semantic conventions are now part of OpenTelemetry! Join the discussion and help us shape the future of LLM observability.

Looking for the JS/TS version? Check out OpenLLMetry-JS.

OpenLLMetry is a set of extensions built on top of OpenTelemetry that gives you complete observability over your LLM application. Because it uses OpenTelemetry under the hood, it can be connected to your existing observability solutions - Datadog, Honeycomb, and others.

It's built and maintained by Traceloop under the Apache 2.0 license.

The repo contains standard OpenTelemetry instrumentations for LLM providers and Vector DBs, as well as a Traceloop SDK that makes it easy to get started with OpenLLMetry, while still outputting standard OpenTelemetry data that can be connected to your observability stack. If you already have OpenTelemetry instrumented, you can just add any of our instrumentations directly.

🚀 Getting Started

The easiest way to get started is to use our SDK. For a complete guide, go to our docs.

Install the SDK:

pip install traceloop-sdk

Then, to start instrumenting your code, just add this line to your code:

from traceloop.sdk import Traceloop

Traceloop.init()

That's it. You're now tracing your code with OpenLLMetry! If you're running this locally, you may want to disable batch sending, so you can see the traces immediately:

Traceloop.init(disable_batch=True)

⏫ Supported (and tested) destinations

See our docs for instructions on connecting to each one.

🪗 What do we instrument?

OpenLLMetry can instrument everything that OpenTelemetry already instruments - so things like your DB, API calls, and more. On top of that, we built a set of custom extensions that instrument things like your calls to OpenAI or Anthropic, or your Vector DB like Chroma, Pinecone, Qdrant or Weaviate.

Vector DBs

Frameworks

Protocol

🔎 Telemetry

We no longer log or collect any telemetry in the SDK or in the instrumentations. Make sure to bump to v0.49.2 and above.

Why we collect telemetry

  • The primary purpose is to detect exceptions within instrumentations. Since LLM providers frequently update their APIs, this helps us quickly identify and fix any breaking changes.
  • We only collect anonymous data, with no personally identifiable information. You can view exactly what data we collect in our Privacy documentation.
  • Telemetry is only collected in the SDK. If you use the instrumentations directly without the SDK, no telemetry is collected.

🌱 Contributing

Whether big or small, we love contributions ❤️ Check out our guide to see how to get started.

Not sure where to get started? You can:

💚 Community & Support

  • Slack (For live discussion with the community and the Traceloop team)
  • GitHub Discussions (For help with building and deeper conversations about features)
  • GitHub Issues (For any bugs and errors you encounter using OpenLLMetry)
  • Twitter (Get news fast)

🙏 Special Thanks

To @patrickdebois, who suggested the great name we're now using for this repo!

💫 Contributors

contributors

Core symbols most depended-on inside this repo

get
called by 5219
packages/traceloop-sdk/traceloop/sdk/__init__.py
get_finished_spans
called by 903
packages/traceloop-sdk/traceloop/sdk/utils/in_memory_span_exporter.py
create
called by 331
packages/opentelemetry-instrumentation-openai/opentelemetry/instrumentation/openai/v1/realtime_wrappers.py
end
called by 264
packages/opentelemetry-instrumentation-llamaindex/opentelemetry/instrumentation/llamaindex/dispatcher_wrapper.py
init
called by 120
packages/traceloop-sdk/traceloop/sdk/__init__.py
create
called by 113
packages/traceloop-sdk/traceloop/sdk/datasets/datasets.py
instrument
called by 105
packages/opentelemetry-instrumentation-weaviate/opentelemetry/instrumentation/weaviate/wrapper.py
assert_message_in_logs
called by 96
packages/opentelemetry-instrumentation-bedrock/tests/traces/__init__.py

Shape

Function 3,232
Method 2,220
Class 934
Route 75

Languages

Python100%

Modules by API surface

packages/opentelemetry-instrumentation-openai-agents/tests/test_semconv_messages.py179 symbols
packages/opentelemetry-instrumentation-bedrock/tests/test_semconv_compliance.py123 symbols
packages/opentelemetry-instrumentation-llamaindex/tests/test_finish_reasons.py114 symbols
packages/traceloop-sdk/traceloop/sdk/generated/evaluators/request.py81 symbols
packages/opentelemetry-instrumentation-anthropic/tests/test_semconv_span_attrs.py80 symbols
packages/opentelemetry-semantic-conventions-ai/opentelemetry/semconv_ai/_testing.py79 symbols
packages/opentelemetry-instrumentation-crewai/tests/test_semconv_attrs.py76 symbols
packages/opentelemetry-instrumentation-openai-agents/tests/test_tracing_processor.py72 symbols
packages/traceloop-sdk/tests/guardrails/test_conditions.py71 symbols
packages/opentelemetry-instrumentation-groq/tests/traces/test_span_utils.py66 symbols
packages/traceloop-sdk/traceloop/sdk/tracing/tracing.py63 symbols
packages/opentelemetry-instrumentation-writer/tests/test_chat.py61 symbols

Dependencies from manifests, versioned

@nxlv/python22.0.5 · 1×
nx20.8.1 · 1×
opentelemetry-instrumentation0.59b0 · 1×
opentelemetry-instrumentation-agno
opentelemetry-instrumentation-alephalpha
opentelemetry-instrumentation-anthropic
opentelemetry-instrumentation-bedrock
opentelemetry-instrumentation-chromadb
opentelemetry-instrumentation-cohere
opentelemetry-instrumentation-crewai
opentelemetry-instrumentation-google-generativeai
opentelemetry-instrumentation-groq

For agents

$ claude mcp add openllmetry \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact