Metadata-Version: 2.4
Name: kindred-tracing
Version: 0.1.2
Summary: Kindred OpenTelemetry tracing SDK with Lemma-style trace contract
Author: Kindred
License-Expression: MIT
Project-URL: Homepage, https://github.com/aryanmundre/Kindred
Project-URL: Repository, https://github.com/aryanmundre/Kindred
Project-URL: Documentation, https://github.com/aryanmundre/Kindred/tree/main/packages/tracing/python
Project-URL: Issues, https://github.com/aryanmundre/Kindred/issues
Keywords: kindred,opentelemetry,tracing,observability,agents,otlp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
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
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: opentelemetry-api>=1.20.0
Requires-Dist: opentelemetry-sdk>=1.20.0
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0
Requires-Dist: opentelemetry-semantic-conventions>=0.41b0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21; extra == "dev"

# Kindred Tracing (Python)

OpenTelemetry-backed tracing SDK with Lemma-style trace contract.

```python
import os
from kindred_tracing import kindred_trace, async_trace

kindred_trace.init(
    service_name="my-agent",
    # Defaults to https://api.usekindred.dev/v1/traces when KINDRED_API_KEY is set
    api_key=os.environ["KINDRED_API_KEY"],
    agent_id=os.environ.get("KINDRED_AGENT_ID"),
)

await async_trace(
    {"name": "support-agent", "input": user_message, "thread_id": session_id},
    run,  # async def run(trace): ...
)

# Flush once on shutdown (do not open a dummy root span)
kindred_trace.flush()
# or: kindred_trace.shutdown()
```

See the Kindred repo docs under `docs/tracing/otel/` for full setup and the replay endpoint contract.
