Skip to main content

Automatic instrumentation for Python agent applications, monitored via WSO2 Agent Management Platform

Project description

WSO2 AI Agent Management Platform Instrumentation

Zero-code OpenTelemetry instrumentation for Python agents using the Traceloop SDK, with trace visibility in the WSO2 AI Agent Management Platform.

Overview

amp-instrumentation enables zero-code instrumentation for Python agents, automatically capturing traces for LLM calls, MCP 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, MCP 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 built using a wide range of agent frameworks supported by the TraceLoop SDK

Installation

pip install amp-instrumentation

Quick Start

1. Register Your Agent

First, register your agent at the WSO2 AI Agent Management Platform to obtain your agent API key and configuration details.

2. Set Required Environment Variables

export AMP_OTEL_ENDPOINT="https://amp-otel-endpoint.com" # AMP OTEL endpoint
export AMP_AGENT_API_KEY="your-agent-api-key" # Agent-specific key generated after registration
export AMP_TRACE_ATTRIBUTES="trace-attributes-set" # Custom key-value pairs for trace metadata

3. Run Your Application

Use the amp-instrument command to wrap your application run command:

# Run a Python script
amp-instrument python my_script.py

# Run with uvicorn
amp-instrument uvicorn app:main --reload

# Run with any package manager
amp-instrument poetry run python script.py
amp-instrument uv run python script.py

That's it! Your application is now instrumented and sending traces to the WSO2 AI Agent Management Platform.

Project details


Download files

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

Source Distribution

amp_instrumentation-0.1.2.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

amp_instrumentation-0.1.2-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file amp_instrumentation-0.1.2.tar.gz.

File metadata

  • Download URL: amp_instrumentation-0.1.2.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for amp_instrumentation-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f70bddea2f2326f17b6cd6b5fac4d6a5e3993facdbac5233462fda188fe0e294
MD5 0a0fea6bb21d7333fe7a5c7509e95fad
BLAKE2b-256 fc6aeb28b64be4913328f144230cfa061586d0c152fe4d1538a26e5da6c70ec4

See more details on using hashes here.

File details

Details for the file amp_instrumentation-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for amp_instrumentation-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8d41303e9961203b9f8da051dc496316230634b5b7052b6cbd1c27e1c6bc3ab
MD5 2774530330d17233dda613e5602cdd6f
BLAKE2b-256 c258ba4ea55941cfa8985daaa2c028b7ef639be3bebb75090dd28c8e2751063e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page