Skip to main content

respan-instrumentation-pydantic-ai

Respan instrumentation plugin for PydanticAI.

This package enables PydanticAI's native OpenTelemetry emission and maps the resulting PydanticAI attributes directly into the Respan/Traceloop conventions used by the OTLP pipeline.

Install

pip install respan-instrumentation-pydantic-ai

Quickstart

import os

from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIModel
from pydantic_ai.providers.openai import OpenAIProvider
from respan import Respan
from respan_instrumentation_pydantic_ai import PydanticAIInstrumentor

respan = Respan(
    api_key=os.environ["RESPAN_API_KEY"],
    instrumentations=[PydanticAIInstrumentor()],
)

agent = Agent(
    OpenAIModel("gpt-4o-mini", provider=OpenAIProvider(api_key=os.environ["OPENAI_API_KEY"]))
)

result = agent.run_sync("Write a one-line haiku about tracing.")
print(result.output)

respan.flush()

Notes

  • By default the instrumentor enables global PydanticAI instrumentation via Agent.instrument_all(...).
  • Pass agent=... to PydanticAIInstrumentor(...) if you only want to instrument one agent instance.
  • The plugin uses explicit InstrumentationSettings(version=5) to keep emitted spans on the current Pydantic AI v2 GenAI semantic conventions.
  • This package does not depend on OpenInference at runtime; it consumes native PydanticAI telemetry directly.

Metadata

Release files for respan-instrumentation-pydantic-ai 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for respan-instrumentation-pydantic-ai 0.1.4
File Size Uploaded
respan_instrumentation_pydantic_ai-0.1.4.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for respan-instrumentation-pydantic-ai 0.1.4
File Interpreter ABI Platform
respan_instrumentation_pydantic_ai-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 26.7 kB

Release files / respan_instrumentation_pydantic_ai-0.1.4.tar.gz

Download URL respan_instrumentation_pydantic_ai-0.1.4.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6de4da35755efe551fc1ae88621e0587da11f47058d1df28897e8e20a3d295ec
BLAKE2b-256 checksum
How to use checksums
90172985277611d84bb82ab672b7e8b33fd8a1215de71cfb4583372bc11392f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release files / respan_instrumentation_pydantic_ai-0.1.4-py3-none-any.whl

Download URL respan_instrumentation_pydantic_ai-0.1.4-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdb061ad4bd807f7e1507173b7ea5a094c71c518356ad63a72e16e1287a50747
BLAKE2b-256 checksum
How to use checksums
fdf5f764c1ac72a167af281cc1900c0e456d783d737a6a0563ab2cbcf06699e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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