Automatic instrumentation for Python applications using Traceloop SDK
Project description
Agent Instrumentation
Automatic OpenTelemetry instrumentation for Python agents using the Traceloop SDK, with trace visibility.
Overview
agent-instrumentation enables zero-code instrumentation for Python agents, automatically capturing traces for LLM calls, API requests, and other operations. It seamlessly wraps your agent’s execution with OpenTelemetry tracing powered by the Traceloop SDK.
Features
- Zero Code Changes: Instrument existing applications without modifying code
- Automatic Tracing: Traces LLM calls, HTTP requests, database queries, and more
- OpenTelemetry Compatible: Uses industry-standard OpenTelemetry protocol
- Flexible Configuration: Configure via environment variables
- Framework Agnostic: Works with any Python application or framework
Installation
pip install -i agent-instrumentation
Quick Start
1. Set Required Environment Variables
export AMP_APP_NAME="my-application"
export AMP_OTEL_EXPORTER_OTLP_ENDPOINT="https://your-otel-endpoint.com"
export AMP_API_KEY="your-api-key"
2. Run Your Application
Use the agent-trace command to wrap your application:
# Run a Python script
agent-trace python my_script.py
# Run with uvicorn
agent-trace uvicorn app:main --reload
# Run with any package manager
agent-trace poetry run python script.py
agent-trace uv run python script.py
That's it! Your application is now instrumented and sending traces to your configured endpoint.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_instrumentation-1.0.1.tar.gz.
File metadata
- Download URL: agent_instrumentation-1.0.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0c1f199d5e0756965a960b7efdaa53aba6eacff81b2a0be6edf885b3c4b1cc4
|
|
| MD5 |
ca3903264cd4d2d933a68382a3fc5a8e
|
|
| BLAKE2b-256 |
9599b677e562dd329ba5264b8141b861c83ebca4d2905b175dda0b074e843d5e
|
File details
Details for the file agent_instrumentation-1.0.1-py3-none-any.whl.
File metadata
- Download URL: agent_instrumentation-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c23b4c67766ee69a8feefd6f643e26b3ca79e51d7e007a8a560bbb2eee88d090
|
|
| MD5 |
6ec993ef18aff136d7b21a8c4ac7cc5d
|
|
| BLAKE2b-256 |
e5c318b65cdd5815dd61d74bbf86bb84f9711d0341be295b71a7829f6c0cc6fc
|