Metadata-Version: 2.4
Name: verica-observability
Version: 0.1.1
Summary: Two-line LLM tracing for Verica: init(token) and your OpenAI/Anthropic calls land as evaluable traces.
Project-URL: Homepage, https://verica.app
License-Expression: MIT
Keywords: evals,llm,observability,opentelemetry,tracing,verica
Requires-Python: >=3.9
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27
Requires-Dist: opentelemetry-instrumentation-anthropic>=0.33
Requires-Dist: opentelemetry-instrumentation-openai>=0.33
Requires-Dist: opentelemetry-sdk>=1.27
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.6; extra == 'dev'
Description-Content-Type: text/markdown

# verica-observability

Two-line LLM tracing for [Verica](https://verica.app): your OpenAI/Anthropic
calls land as evaluable traces.

## Install

```bash
pip install verica-observability
```

## Use

```python
import verica

verica.init(token=os.environ["VERICA_TOKEN"])

# Import AFTER init so the client is patched.
from openai import OpenAI
```

## Serverless

Call `verica.flush()` (or `verica.shutdown()`) before the runtime freezes so
the span batch is exported.

## Options

| Option / env var                             | Default    | Notes                           |
| -------------------------------------------- | ---------- | ------------------------------- |
| `token` / `VERICA_TOKEN`                     | (required) | ingest-scoped API token         |
| `capture_content` / `VERICA_CAPTURE_CONTENT` | `true`     | send prompt/response content    |
| `conversation_id`                            | (none)     | stamps `gen_ai.conversation.id` |
| `service_name` / `OTEL_SERVICE_NAME`         | `app`      | resource service.name           |
| `debug` / `VERICA_DEBUG`                     | `false`    | log export errors               |

Fail-open by design: if Verica is unreachable or the token is invalid, spans are
dropped and your app is never affected. Export errors are silent unless `debug`
is on.
