Relari-OTel
The `relari-otel package provides a lightweight wrapper around OpenTelemetry primitives for tracing LLM applications and send the traces to a collector. This repository is met to be used with Agent-Contracts
Quickstart
First, install the package, specifying the instrumentations you want to use.
For example, to install the package with OpenAI and Langchain/Langgraph instrumentations:
pip install 'relari-otel[langchain,openai]'
Initialize the telemetry in your code
Relari.init(project_name="Your Project Name")
Certification
If you intend to use the certification feature (see agent-contracts docs) you need to add the vertification extra:
pip install 'relari-otel[langchain,openai,certification]'
Instrumentation
All your framework and models are instrumented automatically. However OpenTelemetry does not know how your code is structured. To wrap all the spans in a trace you can use
with Relari.start_new_sample(scenario_id="scenario_A"):
await my_agent_code(specs["scenario_A"]["data"])
or alternative to run an evaluation over a specification
async def runnable(data: Any):
agent_inputs = prepare_my_agent_input(data)
return my_agent_code(agent_inputs)
await Relari.eval_runner(specs=specs, runnable=runnable)
Acknowledgements
Autoinstrumentations are provided by Arize
Metadata
Release files for relari-otel 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| relari_otel-0.0.1.tar.gz | 13.1 kB | Without provenance | Details for relari_otel-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| relari_otel-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for relari_otel-0.0.1-py3-none-any.whl |
Total release size: 28.2 kB
Release files / relari_otel-0.0.1.tar.gz
| Download URL | relari_otel-0.0.1.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54f42be111b9093e8a9d399eb5cfc190536277fc6c7407310618b894baeef78c
|
|
BLAKE2b-256 checksum How to use checksums |
59afbf7a308c3e274607d54b9d281925b9b654189ac57436643c6dd65959beb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.8 Darwin/23.4.0
|
Release files / relari_otel-0.0.1-py3-none-any.whl
| Download URL | relari_otel-0.0.1-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74cfb9519562063b26931bc740473a44d1792380f0f21d9b6ea6aefd5889bb61
|
|
BLAKE2b-256 checksum How to use checksums |
2667f6f4920f391bf3fb29b5bbe41df3ef109f4b65d52c3b1598122a8396cd49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.8 Darwin/23.4.0
|
Security for relari-otel 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.