Respan instrumentation plugin for Haystack
Project description
respan-instrumentation-haystack
Respan instrumentation plugin for Haystack by deepset. Wraps opentelemetry-instrumentation-haystack to automatically trace pipeline runs, component executions, and LLM calls.
Configuration
1. Install
pip install respan-instrumentation-haystack
2. Set Environment Variables
| Variable | Required | Description |
|---|---|---|
RESPAN_API_KEY |
Yes | Your Respan API key. |
RESPAN_BASE_URL |
No | Defaults to https://api.respan.ai. |
Quickstart
3. Run Script
import os
from dotenv import load_dotenv
load_dotenv()
from respan import Respan
from respan_instrumentation_haystack import HaystackInstrumentor
respan = Respan(instrumentations=[HaystackInstrumentor()])
from haystack import Pipeline
from haystack.components.generators import OpenAIGenerator
from haystack.components.builders import PromptBuilder
template = """Answer the following question: {{question}}"""
pipe = Pipeline()
pipe.add_component("prompt_builder", PromptBuilder(template=template))
pipe.add_component("llm", OpenAIGenerator(model="gpt-4o-mini"))
pipe.connect("prompt_builder", "llm")
result = pipe.run({"prompt_builder": {"question": "What is the capital of France?"}})
print(result["llm"]["replies"][0])
respan.flush()
4. View Dashboard
After running the script, traces appear on your Respan dashboard.
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 respan_instrumentation_haystack-0.1.0.tar.gz.
File metadata
- Download URL: respan_instrumentation_haystack-0.1.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.12.12 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9da7c6b0a2423b500502d80f012b3af84a07977d10b7f2df87ca224f94310dd
|
|
| MD5 |
815efae19c6bc34305fa309d6d621234
|
|
| BLAKE2b-256 |
12996d93caaca0c1b42c5337f479c1f31dac1a78045cab0523c2c85643517b41
|
File details
Details for the file respan_instrumentation_haystack-0.1.0-py3-none-any.whl.
File metadata
- Download URL: respan_instrumentation_haystack-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.4 CPython/3.12.12 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
271da8cfe21098cc958fe720a640c84c9300a784539dd17f34fdd2b087415037
|
|
| MD5 |
563e5e7a945a0a63b09b12a2cd0b6482
|
|
| BLAKE2b-256 |
ef2e47d0c7f9cc9f8071ead5aae42a8f6c41465af6b70d5f4f2bc5e5b7cc3657
|