opentelemetry-instrumentation-replicate
OpenTelemetry Replicate instrumentation
What it is and what it does
This package hooks into the official Replicate Python library to automatically capture traces of your API calls. When you use Replicate to run models or generate images, the instrumentation records details like prompts, completions, and embeddings as OpenTelemetry span attributes, giving you visibility into what your application is sending and receiving.
By default, it logs all content to spans for debugging and quality evaluation. If that's a privacy concern—because prompts may contain sensitive user data—you can disable content logging by setting the environment variable TRACELOOP_TRACE_CONTENT to false, which reduces both privacy exposure and trace size. The package is designed to integrate seamlessly with existing OpenTelemetry observability stacks.
Use it for:
- Debug Replicate model outputs and prompts by inspecting span attributes in your tracing backend.
- Monitor LLM application behavior in production by exporting Replicate traces to Jaeger, Datadog, or similar.
- Evaluate prompt quality and model performance by analyzing trace data over time.
- Reduce trace verbosity and protect sensitive user data by disabling content logging in production.
- Correlate Replicate API calls with other application spans for end-to-end request tracing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds OpenTelemetry tracing to Replicate API calls, capturing prompts, completions, and image generation requests as span attributes for observability and debugging.
Yes, if you use Replicate and already have OpenTelemetry infrastructure in place. The package is actively maintained, has no known vulnerabilities, and adds observability with minimal friction. Install it only if you need tracing; it requires Python 3.10+ and an OpenTelemetry SDK configured elsewhere in your application.
Install
opentelemetry-instrumentation-replicate on PyPI
pip
pip install opentelemetry-instrumentation-replicateuv
uv add opentelemetry-instrumentation-replicatepoetry
poetry add opentelemetry-instrumentation-replicateInstalling opentelemetry-instrumentation-replicate
Before you install
Low install friction with a pure-Python wheel. Actively maintained as of 2026-08-10 with recent releases. Depends on four OpenTelemetry packages (api, instrumentation, semantic-conventions-ai, semantic-conventions), all standard observability infrastructure.
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
Quickstart
pip install opentelemetry-instrumentation-replicate
from opentelemetry.instrumentation.replicate import ReplicateInstrumentor
ReplicateInstrumentor().instrument()
Requires Python 3.10 or later. Assumes an OpenTelemetry SDK and exporter are already configured in your application.
Verify before relying
- Whether this instrumentation works with all Replicate API endpoints or only specific model types.
- Performance overhead of tracing on Replicate API call latency.
- Compatibility with different OpenTelemetry exporter backends (Jaeger, Datadog, etc.).
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions-ai, opentelemetry-semantic-conventions |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,849,634/month — #1,833 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_replicate-0.62.3-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
openfeature-hooks-opentelemetryAutomatically captures feature flag evaluations…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-anthropicAdds OpenTelemetry tracing to Anthropic API…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openaiCaptures traces of OpenAI API calls (prompts,…
permissive · top 5,000 on PyPI
replicateA Python client for running machine learning…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-writerAutomatically traces calls to Writer's API…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-google-generativeaiAutomatically traces prompts, completions, and…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-litellmAdds OpenTelemetry tracing to LiteLLM,…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-cohereAutomatically traces calls to Cohere's API…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-transformersAdds distributed tracing to HuggingFace…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-groqAutomatically captures traces of Groq SDK API…
permissive · top 5,000 on PyPI