--- id: openinference-instrumentation-haystack version: "0.1.36" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openinference-instrumentation-haystack — OpenInference Haystack Instrumentation License: permissive · Maintenance: active · Downloads: 333.7K/mo ## What it is and what it does This package wraps Haystack pipelines and components with OpenTelemetry instrumentation, automatically capturing execution traces and sending them to an observability backend. It integrates with the OpenInference semantic conventions to standardize how LLM application traces are structured, making it easy to monitor Haystack-based LLM systems in tools like Arize Phoenix or Arize AX without modifying your application code. The instrumentation is applied once via a single call to HaystackInstrumentor().instrument(), after which all Haystack components in your pipeline emit traces automatically. You configure where traces are sent by setting up an OpenTelemetry tracer provider with a span processor and exporter (typically OTLP HTTP to a local or remote collector). The package depends on openinference-instrumentation, opentelemetry-api, opentelemetry-instrumentation, and their semantic convention libraries to handle the tracing plumbing. Use it for: - Monitor Haystack LLM pipeline execution in real time by sending traces to Arize Phoenix running locally on your development machine. - Debug slow or failing Haystack components by inspecting detailed span attributes (prompts, model calls, latencies) in an observability UI. - Track production Haystack applications by exporting traces to a centralized OpenTelemetry collector for long-term analysis and alerting. - Correlate Haystack pipeline behavior with upstream or downstream systems by using OpenTelemetry's trace context propagation. - Audit LLM application behavior by capturing what prompts were sent, which models were called, and how long each step took. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Auto-instruments Haystack LLM pipelines and components to emit OpenTelemetry traces for monitoring and observability in tools like Arize Phoenix. Yes. The package is actively maintained (release 7 days ago), production-stable, has no known vulnerabilities, and low install friction. It solves a real observability gap for Haystack users. Install it if you need to monitor or debug Haystack LLM pipelines; skip it only if you have no observability requirements or use a different instrumentation approach. ## Install pip install openinference-instrumentation-haystack uv add openinference-instrumentation-haystack poetry add openinference-instrumentation-haystack ## Installing openinference-instrumentation-haystack Before you install: Low friction install with seven runtime dependencies. Actively maintained with a release 7 days ago and recent commits; marked Production/Stable and supports Python 3.10 through 3.14. License in practice: Apache-2.0 (permissive): you can use, modify, and distribute this package freely in commercial and private projects, provided you include a copy of the license and state significant changes. Quickstart: pip install openinference-instrumentation-haystack from openinference.instrumentation.haystack import HaystackInstrumentor from opentelemetry.sdk import trace as trace_sdk from opentelemetry.sdk.trace.export import SimpleSpanProcessor from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter from opentelemetry import trace as trace_api tracer_provider = trace_sdk.TracerProvider() trace_api.set_tracer_provider(tracer_provider) tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter("http://localhost:6006/v1/traces"))) HaystackInstrumentor().instrument() Requires an OpenTelemetry collector endpoint (e.g., Arize Phoenix running locally or remotely) to receive and display traces. Verify before relying: - Whether instrumentation covers all Haystack component types or only a subset (e.g., PromptBuilder, OpenAIGenerator mentioned but full coverage unclear). - Performance overhead of instrumentation on typical Haystack pipeline execution. - Whether custom Haystack components are automatically instrumented or require manual span setup. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 333.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags haystack instrumentation opentelemetry, llm application tracing monitoring, haystack pipeline observability, opentelemetry haystack integration, llm trace collection, haystack component tracing, arize phoenix instrumentation, llm-observability, opentelemetry, haystack [View on SkillFed](https://skillfed.io/packages/openinference-instrumentation-haystack) · [View on PyPI](https://pypi.org/project/openinference-instrumentation-haystack/)