Relari Open-Telemetry package
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file relari_otel-0.0.1.tar.gz.
File metadata
- Download URL: relari_otel-0.0.1.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.8 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54f42be111b9093e8a9d399eb5cfc190536277fc6c7407310618b894baeef78c
|
|
| MD5 |
dd6727b50368b45b774978c08f8de109
|
|
| BLAKE2b-256 |
59afbf7a308c3e274607d54b9d281925b9b654189ac57436643c6dd65959beb1
|
File details
Details for the file relari_otel-0.0.1-py3-none-any.whl.
File metadata
- Download URL: relari_otel-0.0.1-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.8 Darwin/23.4.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74cfb9519562063b26931bc740473a44d1792380f0f21d9b6ea6aefd5889bb61
|
|
| MD5 |
e29bfa8a68228951e454ebc74b03dc05
|
|
| BLAKE2b-256 |
2667f6f4920f391bf3fb29b5bbe41df3ef109f4b65d52c3b1598122a8396cd49
|