Metadata-Version: 2.4
Name: aevum-otel
Version: 0.7.2
Summary: Aevum — OpenTelemetry bridge complication. Routes sigchain events to OTel GenAI spans.
Project-URL: Homepage, https://aevum.build
Project-URL: Repository, https://github.com/aevum-labs/aevum
Project-URL: Issues, https://github.com/aevum-labs/aevum/issues
License-Expression: Apache-2.0
Keywords: aevum,audit,genai,observability,opentelemetry,otel
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: aevum-core>=0.7.0
Requires-Dist: opentelemetry-api>=1.27.0
Requires-Dist: opentelemetry-sdk>=1.27.0
Provides-Extra: dev
Requires-Dist: mypy>=1.9; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Provides-Extra: otlp
Requires-Dist: opentelemetry-exporter-otlp-proto-grpc>=1.27.0; extra == 'otlp'
Provides-Extra: otlp-http
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27.0; extra == 'otlp-http'
Description-Content-Type: text/markdown

# aevum-otel

OpenTelemetry bridge complication for Aevum. Routes sigchain events to OTel GenAI spans.

## Install

```bash
pip install aevum-otel
# With OTLP HTTP exporter:
pip install "aevum-otel[otlp-http]"
# With OTLP gRPC exporter:
pip install "aevum-otel[otlp]"
```

## Usage

```python
from aevum.core import Engine
from aevum.otel import AevumOTelBridge

bridge = AevumOTelBridge(service_name="my-service")
engine = Engine()
engine.install_complication(bridge, auto_approve=True)

# All engine calls (ingest, query, etc.) now emit OTel GenAI spans.
```

## Privacy defaults

By default only `audit_id` is emitted as `gen_ai.content.reference`. No prompt or response content is included.

To opt in to richer attributes:

```bash
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
```

## GenAI semantic conventions

For the latest experimental GenAI semconv:

```bash
export OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental
```

See [OTel GenAI semconv documentation](https://opentelemetry.io/docs/specs/semconv/gen-ai/) for details.

## Tested exporters

- Console exporter (always available via `opentelemetry-sdk`)
- Grafana Tempo (document setup if environment permits — otherwise note as untested)
- Langfuse (document setup if environment permits — otherwise note as untested)

## License

Apache-2.0
