Skip to main content

Llumo OpenTelemetry Python SDK for LLM Observability

Project description

LLumo Telemetry SDK (Python)

A powerful telemetry SDK designed to instrument LLM operations via OpenAI, Anthropic, and LangChain and send formatted OpenTelemetry data to your backend telemetry server.

Installation

  1. Create a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Setup Guide

Place this initialization setup at the entry point of your application, before you initialize any LLM clients.

```python
from llumo_otel import initSDK, TelemetryConfig

# Initialize the telemetry
config = TelemetryConfig(
    endpoint='http://localhost:4455/api/v1/telemetry',  # Your custom telemetry API endpoint
    authToken='your-auth-token',  # Optional Auth Bearer Token
    flushDelayMillis=500  # Span buffer flush interval (def: 500ms)
)

# Pass optional library instances if you need manual instrumentation
# config.libraries = {
#     "OpenAI": openai_client,
#     "Anthropic": anthropic_client
# }

initSDK(config)

print("Telemetry configured successfully.")

Configuration Options

Option Type Required Description
endpoint string Yes The URL of your telemetry ingestion server
authToken string No Optional Bearer token inside Auth header
flushDelayMillis int No Interval to ship logs in milliseconds. Defaults to 500ms
maxExportBatchSize int No Max payload size limits. Defaults to 50
libraries dict No Optional dict for injecting specific AI client instances

Features

  • Built-in Instrumentations: Supports OpenAI, Anthropic, Gemini (Vertex AI & Google GenAI), LangChain, requests, and urllib3.
  • Auto Data Sanitation: MongoDB-compliant key formatting automatically escapes problematic fields (. and $) before transmission.
  • Trace Exporters: Uses BatchSpanProcessor with a custom FormattingExporter for structured, ready-to-consume payloads.
  • Performance: Asynchronous-style exporting via OTel's native batching to minimize impact on application latency.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llumo_otel-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llumo_otel-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file llumo_otel-0.1.0.tar.gz.

File metadata

  • Download URL: llumo_otel-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for llumo_otel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a0b8c16dcc298f4a2193d7ed0ccb7b893b04e5cdd758126a94cc396e5abcaf49
MD5 874cc4c46f60c95f818973adb63aac1e
BLAKE2b-256 42130a7dd7aa97c8f9e998066fd59d6cdd9b93d963c5fc3c3b66396ca5b386d9

See more details on using hashes here.

File details

Details for the file llumo_otel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: llumo_otel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for llumo_otel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80fa3c0416416730c9fab5c5101e3e89ab883b640fd957bd9a2d6e5e5e9a3c0c
MD5 0e331961bc029a6df036106169cc6fd1
BLAKE2b-256 abc37977bc872192c8608890c4bfb647b58f5e212d9b03db2e3bbedb15eadebc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page