Skip to main content
Python auto-instrumentation library for LLM applications implemented with Haystack. Haystack Pipelines and Components (ex. PromptBuilder, OpenAIGenerator, etc.) are fully OpenTelemetry-compatible and can be sent to an OpenTelemetry collector for monitoring, such as Arize Phoenix.

Installation

Quickstart

This quickstart shows you how to instrument your Haystack-orchestrated LLM application. Install required packages:

Start Phoenix server

Start Phoenix in the background as a collector. By default, it listens on http://localhost:6006. You can visit the app via a browser at the same address. (Phoenix does not send data over the internet. It only operates locally on your machine.)

Setup instrumentation

Set up HaystackInstrumentor to trace your application and send traces to Phoenix:

Set up a simple Pipeline

Now, on the Phoenix UI in your browser, you should see the traces from your Haystack application. Specifically, you can see attributes from the execution of the OpenAIGenerator.

More Info