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=...toPydanticAIInstrumentor(...)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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| respan_instrumentation_pydantic_ai-0.1.4.tar.gz | 12.3 kB | With provenance | Details for respan_instrumentation_pydantic_ai-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| respan_instrumentation_pydantic_ai-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for respan_instrumentation_pydantic_ai-0.1.4-py3-none-any.whl |
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 logRelease 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 logSecurity for respan-instrumentation-pydantic-ai 0.1.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for respan_instrumentation_pydantic_ai-0.1.4.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.