Skip to main content

Python SDK for tool usage logging and monitoring

Project description

Observe Python SDK

A Python SDK for tool usage logging and monitoring.

Installation

pip install observee

Usage

You can set the MCP server name either globally or per decorator:

Global Configuration

from observee import ObserveeConfig, observee_usage_logger

# Set the MCP server name globally
ObserveeConfig.set_mcp_server_name("your-mcp-server-name")

@observee_usage_logger
async def your_function():
    # Your code here
    pass

Per-Decorator Configuration

from observee import ObserveeConfig, observee_usage_logger

@observee_usage_logger
async def your_function():
    # Your code here
    pass

Features

  • Tool usage logging with async support
  • Automatic logging of:
    • Tool name
    • Input parameters
    • Response data
    • Execution duration
    • Error information (if any)
  • Configurable logging endpoint (defaults to Observe API)
  • Error handling and reporting
  • Performance tracking
  • Flexible MCP server name configuration

Logging Details

The SDK automatically logs the following information for each tool usage:

  • MCP server name
  • Tool name (derived from function name)
  • Tool input parameters (as JSON)
  • Tool response
  • Execution duration in milliseconds
  • Any errors that occur during execution

Logs are sent asynchronously to avoid impacting tool performance.

Requirements

  • Python 3.8 or higher
  • Dependencies:
    • httpx
    • pydantic

License

MIT

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

observee-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

observee-0.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file observee-0.1.1.tar.gz.

File metadata

  • Download URL: observee-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.4.0 tqdm/4.67.1 importlib-metadata/8.7.0 keyring/25.6.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.10.16

File hashes

Hashes for observee-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fb14051dbbd80c2bcae948f3aa4564b9820e6e2a66b641f2e5ea251586584f0c
MD5 8e2ccc92e6ffeb78024db84cc40230e2
BLAKE2b-256 6f87482ea87af9c8209ab1dd99c3f185e2934994eb78cf89a918fb7060f7c057

See more details on using hashes here.

File details

Details for the file observee-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: observee-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/44.0 requests/2.32.3 requests-toolbelt/1.0.0 urllib3/2.4.0 tqdm/4.67.1 importlib-metadata/8.7.0 keyring/25.6.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.10.16

File hashes

Hashes for observee-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4d6062da75a76ccbbd6327d5c22592f3ac0d67dc1ce0ea7e9617ff4b35a19ec
MD5 cb1051c408fe52fbb83e85d307a636cc
BLAKE2b-256 1a4bcb8d3aa8f61110023f14d202a43517ae4cea4292d1f5b63d08ce5c433c72

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