Skip to main content

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

Project description

WSO2 Agent Manager Instrumentation

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

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 Agent Manager 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

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 Agent Manager.

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.6.tar.gz (12.5 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.6-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amp_instrumentation-0.1.6.tar.gz
Algorithm Hash digest
SHA256 df9fe3f5d2e8745de5de13be8ab2c7a5a1e04bafcc45dc5321b363ffb20be301
MD5 0d7120a319fb25494f2d54f1c48b67d8
BLAKE2b-256 59540e5357473b673ebe2566d7330ce09424823321d63161ea9728632818e622

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amp_instrumentation-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3d0ca7c7e308c2ca067241069336ed378d77fbd923319635c9acdd8f4d199dd8
MD5 d8a53afaae567e3bffa7d2786fdba0ed
BLAKE2b-256 d0e4618188bc90896c04d9b1e137526505a7e1b7cff48f0190981b4550f18b1d

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