Skip to main content

No project description provided

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tracing_auto_instrumentation-0.0.11.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file tracing_auto_instrumentation-0.0.11.tar.gz.

File metadata

File hashes

Hashes for tracing_auto_instrumentation-0.0.11.tar.gz
Algorithm Hash digest
SHA256 73a67f80de26b7d89fcd0fb3a0ebdf9200cd13c7d09729a5674e4d38666f518a
MD5 224f92a49fbe02673c447da4d6ef9026
BLAKE2b-256 b097d7a665ae4ddd484551e7d6c1f753ade7379e71902952bf923e3e0307da39

See more details on using hashes here.

File details

Details for the file tracing_auto_instrumentation-0.0.11-py3-none-any.whl.

File metadata

File hashes

Hashes for tracing_auto_instrumentation-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 92fe5e2c62c4078a0a2811156f6cab6099e5ac5a1d488b47ee967beb0ad5af80
MD5 bc368a88d8658a762834855cafddd39d
BLAKE2b-256 04221d9c7e244f0038286d0393ed9e4adf4ec0d535dcbfbe934c2e5a6436cc94

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page