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.
Metadata
Release files for respan-instrumentation-haystack 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| respan_instrumentation_haystack-0.1.0.tar.gz | 2.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_instrumentation_haystack-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / respan_instrumentation_haystack-0.1.0.tar.gz
| Download URL | respan_instrumentation_haystack-0.1.0.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9da7c6b0a2423b500502d80f012b3af84a07977d10b7f2df87ca224f94310dd
|
|
BLAKE2b-256 checksum How to use checksums |
12996d93caaca0c1b42c5337f479c1f31dac1a78045cab0523c2c85643517b41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.12.12 Darwin/25.0.0
|
Release files / respan_instrumentation_haystack-0.1.0-py3-none-any.whl
| Download URL | respan_instrumentation_haystack-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
271da8cfe21098cc958fe720a640c84c9300a784539dd17f34fdd2b087415037
|
|
BLAKE2b-256 checksum How to use checksums |
ef2e47d0c7f9cc9f8071ead5aae42a8f6c41465af6b70d5f4f2bc5e5b7cc3657
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.4 CPython/3.12.12 Darwin/25.0.0
|