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

Uploaded Python 3

File details

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

File metadata

  • Download URL: amp_instrumentation-0.1.5.tar.gz
  • Upload date:
  • Size: 12.3 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.5.tar.gz
Algorithm Hash digest
SHA256 0ce8ea594b3c82b1df3132dc7cb60b3c744c6d8c75542faf79844d7ece9d5cdd
MD5 83f6b9fe345870182839b504c4ae37c7
BLAKE2b-256 25a682cf2033c720d1ad9cf71d2bcd1a94160ef055a626637386819f18d5b7fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amp_instrumentation-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9dc2932c74db08453574fb220dbd004302b3df6dbfddd69a3ceeccf4b34a7dfe
MD5 9f8cbcf5f7d51f04e0d6276eade569f7
BLAKE2b-256 77ed39acf0af41284e219f0e1f08a29a5a711a83fa920a75a3d562c0b5fcc221

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