Metadata-Version: 2.5
Name: liman_finops
Version: 0.1.0
Summary: Liman AgentOps FinOps Library
Author-email: Guro Bokum <jiojiajiu@gmail.com>
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.10
Requires-Dist: liman-core
Requires-Dist: opentelemetry-api>=1.35.0
Requires-Dist: opentelemetry-instrumentation>=0.56b0
Requires-Dist: opentelemetry-sdk>=1.35.0
Requires-Dist: wrapt>=1.17.2
Description-Content-Type: text/markdown

# liman-finops

[![codecov](https://codecov.io/gh/gurobokum/liman/graph/badge.svg?token=PMKWXNBF1K&component=python/liman_finops)](https://codecov.io/gh/gurobokum/liman?components[0]=python/liman_finops)

OpenTelemetry instrumentation and cost tracking for Liman agent framework.

## Jaeger Integration Example

**Run Jaeger locally** using Docker:

```bash
docker run --rm --name jaeger \
-p 16686:16686 \
-p 4317:4317 \
-p 4318:4318 \
-p 5778:5778 \
-p 9411:9411 \
cr.jaegertracing.io/jaegertracing/jaeger:2.8.0
```

https://www.jaegertracing.io/docs/2.8/getting-started/

**Setup Liman FinOps with Jaeger**:

```python
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from liman_finops import configure_instrumentor

# Configure Jaeger via OTLP
jaeger_exporter = OTLPSpanExporter(endpoint="http://localhost:4318/v1/traces")
instrumentor = configure_instrumentor(span_exporter=jaeger_exporter)
```

## Trace Attributes

Your traces will include cost information:

- `llm.usage.cost_usd`: Cost in USD (e.g., "0.000150")
- `llm.usage.prompt_tokens`: Input token count
- `llm.usage.completion_tokens`: Output token count
- `model_name`: LLM model used

