Skip to main content

OpenInference Pipecat Instrumentation

Python auto-instrumentation library for Pipecat. This library allows you to convert Pipecat traces to OpenInference, which is OpenTelemetry compatible, and view those traces in Arize Phoenix or Arize AX.

Compatibility

openinference-instrumentation-pipecat pipecat-ai Python
>=2.0 >=1.3 >=3.11
>=1.0, <2.0 >=1.0, <1.3 >=3.11
<=0.1.4 <1.0 (e.g. 0.0.99) >=3.10

Pipecat 1.3 deprecated PipelineTask in favor of PipelineWorker. Instrumentor versions <2.0 only wrap PipelineTask, so bots built on PipelineWorker get no observer injection and emit no spans. Use >=2.0 with pipecat-ai>=1.3.

Pipecat 1.0 introduced breaking changes (renamed observers, removed LLMMessagesFrame, dropped Python 3.10). If you're still on pipecat-ai<1.0, pin this instrumentor to <=0.1.4:

pip install 'openinference-instrumentation-pipecat<=0.1.4' 'pipecat-ai<1.0'

Installation

pip install openinference-instrumentation-pipecat

Quickstart

This quickstart shows you how to setup tracing in your Pipecat application:

from phoenix.otel import register
from openinference.instrumentation.pipecat import PipecatInstrumentor

# Set up the tracer provider
tracer_provider = register(
    project_name="default" #Phoenix project name
)

# Add auto-instrumentor at the top of the application
PipecatInstrumentor().instrument(tracer_provider=tracer_provider)

# Build your Pipecat pipeline
# ... (add your Pipecat pipeline code here)

### CONFIGURATION SETUP (Transport, LLM, STT, TTS) ###

### PIPELINE ###
pipeline = Pipeline(...)

### WORKER ###
worker = PipelineWorker(
    pipeline,
    conversation_id=conversation_id,  # conversation id is used for session tracking in Arize or Phoenix
)

### EVENT HANDLING
@transport.event_handler("on_client_connected")
async def on_client_connected(transport, client):
    await worker.queue_frames([LLMRunFrame()])

### PIPELINE RUNNER ###
runner = PipelineRunner(handle_sigint=runner_args.handle_sigint)
await runner.run(worker)

After configuring tracing, exchanges in the running application are logged to your project in Phoenix or Arize AX.

Example

  1. Install dependencies
uv pip install -e '.[examples]'

or

uv pip install -r examples/trace/requirements.txt
  1. Run example
uv run python examples/trace/001-trace.py

More Info

Download files

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

Source Distribution

openinference_instrumentation_pipecat-2.0.2.tar.gz (33.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file openinference_instrumentation_pipecat-2.0.2.tar.gz.

File metadata

File hashes

Hashes for openinference_instrumentation_pipecat-2.0.2.tar.gz
Algorithm Hash digest
SHA256 0eb7095e8ee935c12fcf5933c639fe943fb40edc14d33c24c0bca3ddd87c326d
MD5 3e62e9d5455390c19ecf62cdd75d25be
BLAKE2b-256 83ac36ad0c141e7eb6453d8daa407296b707fd9a552fcc1d7a863a8516b7f31e

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_pipecat-2.0.2.tar.gz:

Publisher: publish.yaml on Arize-ai/openinference

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openinference_instrumentation_pipecat-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for openinference_instrumentation_pipecat-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1c36d7be057e20ef88f4a610ba71579bd59f161dfa01bb7bdadfb431ecf69b6
MD5 6366a646043c1dd7fa1322e7d32f56e1
BLAKE2b-256 93bfc0e46303eefa7e414adb7f7fe5cca8352882c44d02116f0cc41101cbe72c

See more details on using hashes here.

Provenance

The following attestation bundles were made for openinference_instrumentation_pipecat-2.0.2-py3-none-any.whl:

Publisher: publish.yaml on Arize-ai/openinference

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.0.3

2 files

This release

2.0.2 This release

2 files

2.0.1

2 files

2.0.0

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page