Tracing Auto Instrumentation
Tracing Auto Instrumentation allows you to easily instrument popular LLM frameworks for tracing your LLM application. It is built with and on top of the LastMile Rag Debugger: https://rag.lastmileai.dev/.
Supported Frameworks/Libraries and Examples:
Sure, here's the table with the example links formatted as bullet points:
| Framework/Library | Example Link |
|---|---|
| OpenAI | - openai_instrumentation.ipynb -openai_streaming.ipynb |
| IBM | - ibm.ipynb -ibm_granite_tutorial.ipynb |
| LangChain | - langchain.ipynb |
| LLamaIndex | - llama_index.ipynb -llama_index_function_calls.ipynb |
Getting Started
Getting started is easy. Simply choose the framework you want to instrument and follow the instructions below. If you want to instrument multiple frameworks, you can install all.
pip install "tracing-auto-instrumentation[all]"
OpenAI
pip install "tracing-auto-instrumentation[openai]"
import openai
from tracing_auto_instrumentation.openai import wrap_openai
from lastmile_eval.rag.debugger.tracing.sdk import get_lastmile_tracer
tracer = get_lastmile_tracer(
tracer_name="OpenAI Function Calling",
)
client = wrap_openai(openai.OpenAI(), tracer)
LangChain
pip install "tracing-auto-instrumentation[langchain]"
import langchain
from tracing_auto_instrumentation.langchain import LangChainInstrumentor
# Create an instance of LangChainInstrumentor and instrument the code
instrumentor = LangChainInstrumentor(project_name="Plan-and-Execute Example")
instrumentor.instrument()
LLamaIndex
pip install "tracing-auto-instrumentation[llamaindex]"
import llama_index.core
from tracing_auto_instrumentation.llama_index import LlamaIndexCallbackHandler
llama_index.core.global_handler = LlamaIndexCallbackHandler(
project_name="LlamaIndex with Paul Graham",
)
IBM
pip install "tracing-auto-instrumentation[ibm]"
# todo
Metadata
Release files for tracing-auto-instrumentation 0.0.11
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 | |
|---|---|---|---|---|
| tracing_auto_instrumentation-0.0.11.tar.gz | 22.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tracing_auto_instrumentation-0.0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.7 kB
Release files / tracing_auto_instrumentation-0.0.11.tar.gz
| Download URL | tracing_auto_instrumentation-0.0.11.tar.gz |
|---|---|
| Size | 22.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73a67f80de26b7d89fcd0fb3a0ebdf9200cd13c7d09729a5674e4d38666f518a
|
|
BLAKE2b-256 checksum How to use checksums |
b097d7a665ae4ddd484551e7d6c1f753ade7379e71902952bf923e3e0307da39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / tracing_auto_instrumentation-0.0.11-py3-none-any.whl
| Download URL | tracing_auto_instrumentation-0.0.11-py3-none-any.whl |
|---|---|
| Size | 29.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92fe5e2c62c4078a0a2811156f6cab6099e5ac5a1d488b47ee967beb0ad5af80
|
|
BLAKE2b-256 checksum How to use checksums |
04221d9c7e244f0038286d0393ed9e4adf4ec0d535dcbfbe934c2e5a6436cc94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for tracing-auto-instrumentation 0.0.11
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.